Download and Save a Remote Image on Disk in PHP

Simple PHP code useful to download a remote image and save it on your server. Make sure the /images/ folder has right permissions and groups.

file_put_contents('/images/image.png', file_get_contents('http://www.website.com/image.png'));

More Related Posts