I have an image checking function but it seems to work with the local files only. How to enhance it so that I can check the size of files on remote servers as well? Hope to hear some good tips!
The function looks like this:
function checkImage($picture_url)
{
$fp=fopen($picture_url, "rb");
if($fp)
{
$size = getimagesize ("$picture_url");
if ($size[0]<150 && $size[1]<150 && $picture_url!=null)
{
print("picture size ok!");
return true;
}
else
{
print("picture size NOK!");
return false;
}
}
else
{
print("no picture!");
return false;
}
return true;
}