$image = file_get_contents('http://4rapiddev.com/wp-content/themes/4rapiddev/images/authors/hoanhuynh.png');
   file_put_contents('/home/jiby/Downloads/image.jpg', $image); //Where to save the image on your server

Hi,

the above code will download the file to the web server executing the script, not to the home directory of the client browser.

In practice: if the path /home/jiby/Downloads/image.jpg does not exists in the web server root, then the script will fail.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.