I have a function that got the image width and height info from a file that used to work fine on PHP 4.2.3, now that we moved to PHP 4.3.4, the file doesn't work. It returns 0 as values for height and width. I verified the image is there, it just seems like getimagesize doesn't work right in 4.3.4.
Am I missing something?
$Use_Image would have a value like: /Jazz/Designer/redsetc.jpg
function Image_Tool($Use_Image)
{
$Src_Img_Size = getimagesize("http://www.site.com$Use_Image");
$width=$Src_Img_Size[0];
$height=$Src_Img_Size[1];
if($height>="$width")
{
$x=100*($width/$height);
$Scale_Width=$x;
$Scale_Height="100";
$Image_Array=array("$Scale_Width", "$Scale_Height");
return $Image_Array;
}
else
{
$x=100*($height/$width);
$Scale_Width="100";
$Scale_Height=$x;
$Image_Array=array($Scale_Width, $Scale_Height);
return $Image_Array;
}
}