Hi, How can I retrieve/dump images from another site using PHP? For e.g. if this is the URL www.digitalpoint.com/image.jpg Then how can I save this image on my server using PHP. Can this be done using Snoopy class? Thanks
Theirs many ways, fsockopen(), cURL and file_get_contents(). <?php //image url... - ensure it starts with http:// and exists... $url = 'http://www.digitalpoint.com/image.jpg'; file_put_contents(basename($url), file_get_contents($url)); ?> PHP: That will save image.jpg to your server (within __DIR__)