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
  $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