Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- getimagesize() function problem
February 16, 2005, 10:17 am
rate this thread
Hi everybody of the PHP community,
I am using the php function "getimagesize()" to access the
width/height of an image
from the Web. This function should return false if image is not
Most of the time the function works correctly, but in 2 or 3 cases I
a problem like, search is going on for minutes, and the function does
not return a
false return-code as it should if image is not available ?
If I enter the URL directly in the browser, the result is the same,
browser search for
Minutes and does not return any error.
Does anyone has experience with a similar problem, is there a timeout
that we can
Give to the function getimagesize() ?
Your comments are very welcome and best regards
Tks for your help
Re: getimagesize() function problem
Shouldn't you first check to make sure the image exists?
$source = './images/some.gif';
? list($width, $height, $type, $attrib) = getimagesize($source)
: die('Unable to locate a required script: '.$source);