If you have to use getimagesize on a local file, maybe the best solution is to give to the function the file path rather than the url.

About your problem with the verification, can you post part...