I am writing a CGI script in which I need to check the size of an image that the user has submitted a URL for. Is there anyway to check the size (width and height) of the image? Also the image will probably be on a different site to mine.
I was thinking maybe I could request the image using sockets and then check the size using GD but I am not sure how to do this or if this is the right way to go about it. Any help would be much appreciated.