Hi,
I am using snapcasa.com to provide me with an image.
They encourage you to cache the images on your own server so I am trying to do that.
When I use this code to display the image it works fine:
Now, I want to save this image locally so I tried this:
When I do the above I don't get the real image returned but only their
default "Unregister ed Domain" image.
This maybe an anti-hammer reaction because of the quick succession of my image requests.
So since I already have the image displayed using the <img src=
tag, is there a way to save this image locally ?
If not, maybe I should use the file_get_conten ts() function to get the image data in the first place ?
Would appreciate any input on this :)
.
I am using snapcasa.com to provide me with an image.
They encourage you to cache the images on your own server so I am trying to do that.
When I use this code to display the image it works fine:
Code:
<img src=\"http://snapcasa.com/get.aspx?code=9360&size=l&url=$Db_url\" width='300px' height='200px' alt='Thumbnail for $title_sht'>
Code:
$image_data = file_get_contents("http://snapcasa.com/get.aspx?code=9360&size=l&url=$Db_url");
file_put_contents($image_file, $image_data);
default "Unregister ed Domain" image.
This maybe an anti-hammer reaction because of the quick succession of my image requests.
So since I already have the image displayed using the <img src=
tag, is there a way to save this image locally ?
If not, maybe I should use the file_get_conten ts() function to get the image data in the first place ?
Would appreciate any input on this :)
.
Comment