Saturday, 15 March 2014

Extract images and links from website using php


Extract website data using php Web Crawling. The process by which we extract images, hyperlinks, metadata and several other things from a website is called web crawling. So in this tutorial you will learn about how to crawl images and hyperlinks from a website using php.And also I have used here jquery ajax for displaying the results without page refreshing, and its not mandatory.

Wednesday, 5 March 2014

Autocomplete with PHP, MySQL and Jquery


Autocomplete with PHP, jQuery and MySQL Autocomplete Php is a cool technic you should learn to make your website or you web application looks cool and also user friendly. As you might have known, autocomplete gives a user a list of nearly same data with what he or she is looking for.


Friday, 28 February 2014

Save an image from URL using php


save an image from URL then save it into a directory php Iam Explain about how to save an image form External URL,It is very simple using following code
<?php
  $imageurl ='http://sri-knowledgecorner.rhcloud.com/images/blogicon.jpeg';

  $image=file_get_contents($imageurl);
 
  $imagename = basename($imageurl);//image name
 
  define('DIRECTORY', 'images/'); //save image in images folder

  file_put_contents(DIRECTORY.$imagenam, $image);
?>
Make sure that you have write permission to the directory where you want to store the image.

Tuesday, 11 February 2014

Upload and display an image without a page refresh using Javascript and PHP


Upload and display an image Here Iam explain about how to upload an image without a page refresh using an iframe and some javascript.
Bunch of jquery plugins that do this, but you’ll see here that there is nothing really complicated about it and it can easily be achieved with a couple of javascript lines.

The trick to avoid this full page refresh is to use a ‘target’ attribute on the form and have it point to an iframe. As the submit button is clicked, the browser will load up the response in the targeted iframe without refreshing the whole page.

Tuesday, 4 February 2014

Top Five Most Used PHP Array Functions for Beginners


Array Functions in PHP There is more than fifty array functions available in PHP.
In this Article Iam explain 5 popular array functions


Friday, 31 January 2014

What is memcache and why you use memcache for your website


Memcache with PHP Memcache is Free & open source, high-performance, distributed memory object caching system which improves the website performance In simple words every time your website opens it fetches data from database. Memcache cache this data locally on temporary cache so that every time your website page open it won’t run sql queries to fetch data from DB.

How to Install Memcache in Ubuntu

Thursday, 23 January 2014

Difference Between Single And Double Quotes in PHP


Difference Between Single And Double Quotes in PHP In PHP you can specify the strings by using single and double quotes. There are other methods (heredoc and nowdoc (since PHP 5.3.0)) are also used but first two are used mostly.
It is important to know the difference between using single quotes and double quotes. In this post we will see the difference between them and which should be used when


Single Quotes:
When string is specified in single quotes PHP will not evaluate it or interpret escape characters except single quote with backslash (‘) and backslash(\) which has to be escaped.
  <?php
   $name = 'srinu chilukuri';
   $member = 'This is $name';
   echo $member;
     ?>
If echo $member variable it will print the result as it is without interpreted.

output: This is $name

Double Quotes:
In double quoted strings other escape sequences are interpreted as well any variable will be replaced by their value.
  <?php
   $name = 'srinu chilukuri';
   $member = "This is $name";
   echo $member;
     ?>
output: This is srinu chilukuri