Welcome to WebmasterWorld Guest from 126.96.36.199
any possible (faster) idea would be greatly appreciated. Thanks.
However, you could have two seperate scripts. One (the slave) that makes the request and writes its findings to a file, and another (the master) that calls the first once for each site. This way the master script can run the slave script repeatedly, so you'll have multiple instances of the second script running at once all checking multiple web servers to see if their up. Once completed, the master script will check the file for the findings and report back to you.
As was mensioned before your speedup would not be that much faster but you can either use the "HEAD" request in replace of the "GET" request or you could use "ETag" or "If-Modified-Since".
Just make sure you are requesting an HTML page. If you are requesting a dynamic page then all these methods will not work out of the box since your webserver will not know how to answer them and the logic must be built into the script.
I think your easiest is the "HEAD" request option. But really for your purposes just simply create an HTML page that simply contains "OK" and use your fopen method. An extra 2 bytes of data will not hit your time at all. Then you can simple see if you got "OK" returned.