Can you try this php snippet?
<?
$url_file = fopen("http://amazon.com/images/logo.gif",'rb');
$newfile_name = "/tmp/logo.gif";
$newfile = fopen($newfile_name,'wb');
while (!feof($url_file)) {
$chunk = fread($url_file,1024);
fwrite($newfile,$chunk);
}
fclose($newfile);
fclose($url_file);
?>
You image file should be in located at "/tmp/logo.gif" 🙂