Forum Moderators: coopster
<img src="http://images.amazon.com/images/P/<?php echo "$isbn";?>.01.MZZZZZZZ.jpg">
I have tried using the code below but it does not work because Amazon's image server returns a 807 byte image (looks empty) when it is accessed. Unfortunately I think this code requires a 404 response. Any ideas?
Thank for your help
<?php
//check if image exists
if($img = @GetImageSize("http://images.amazon.com/images/P/echo '$isbn';.01.MZZZZZZZ.jpg"))
{
echo "image exists";
}
else
{
echo "image does not exist";
}
?>
$isbn = 1565926811;
if (@getimagesize("http://images.amazon.com/images/P/" . $isbn . ".01.MZZZZZZZ.jpg"))
{
echo "Image exists";
}
else
{
echo "No image found";
}
Ya, I see what you mean.. but if you change the ISBN # to a ISBN that does not have a picture.. It still replys that the image exists which makes it useless. I changed the isbn in the code above to a book with no picture..
Is there anyway to check for an 807 byte image? If I could do that I may be able to get this to work.
$isbn = 1565926812;
list($Width) = @getimagesize("http://images.amazon.com/images/P/" . $isbn . ".01.MZZZZZZZ.jpg");
if ($Width > 1)
{
echo "Image Exists";
}
else
{
echo "No Image Found";
}