Hi can one of you homies write me a script that will retrieve the size of an image located at a URL, and then if it matches a certain size, display an image of my choosing?
list($width, $height, $type, $attr) = getimagesize($imageFile);
this will give you some info about the image, width, height, type of image, etc....
for more info on how it works check this out
http://www.php.net/manual/en/function.getimagesize.php
Im sorry I wasnt more clear. By "size" I meant file size in bytes. And it's not really the size of the image because the image hasnt been displayed yet, its the size of the actual url page itself... please help!
You can fopen() the URL. Look at stream_get_meta_data() to see if there's a Content-Length header. If there is, that should be the size of the file. If there isn't, you'll have to retrieve the entire file (fread() it) and then look at how much you've read (use strlen()).