Welcome to WebmasterWorld Guest from

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

Retrieving/dumping image from another site

4:07 pm on May 7, 2010 (gmt 0)

Junior Member

10+ Year Member

joined:Sept 8, 2006
posts: 115
votes: 0


How can I retrieve/dump images from another site using PHP?
For e.g. if this is the URL


Then how can I save this image on my server using PHP. Can this be done using Snoopy class?

7:16 pm on May 8, 2010 (gmt 0)

Senior Member

WebmasterWorld Senior Member 5+ Year Member

joined:Feb 22, 2009
votes: 0

Hi there TechMan

I am by no means an expert on this, nor have I ever tried this method, but, copy(); or rename(); may be the way to go here, just thought I would offer those suggestions.

I am assuming at this point as these are pictures on your site(s) because I think lifting them like this is a bit dodgy.

May be worth having a read of [uk3.php.net ] and [uk3.php.net ] to see if you can use full paths too.

7:09 am on May 9, 2010 (gmt 0)

New User

5+ Year Member

joined:Apr 27, 2010
votes: 0


I don't think Snoopy would work as it can't fetch binary data as far as I remember. You can try using
with the flags argument set to

This might not work in case the remote server does some checking on user agent etc.