Originally posted by rahulroy
2) As far as I know fopen does not work via the web "http", its good enough to read folders on local machine
It does in PHP's standard configuration. You can't write, of course, and you only get what you'd get if you request the URL with any other client, but that's all you need for an image.
You can @fopen() the file, (the @ suppresses the error message), and then look to see if the file pointer you assigned the result to is false or not. If it's false, the request failed.