EDIT 1 : sorry for edditing ... don't put the question first.
you need to understand that the server will respond in some way. you just need to check then the response code, not the response text. or to parse text.
in your case, the server response, for example:
Object not found! The requested URL was not found on this server. If you entered the URL manually please check your spelling and try again. If you think this is a server error, please contact the webmaster. Error 404 work.local Thu Jul 28 13:22:49 2011 Apache/2.2.15 (Linux/SUSE)
Edit 2 : you can better use socket_connect instead of fopen to check if the file exists
Subdigger
source share