Robert Cummings wrote:
can use a PHP script that opens a socket connection on port 80 to get

For these interactive things, Perl seems much more appropriate for me.
Using libwww aka LWP for the web client (LWP::UserAgent or LWP::RobotUA)
Using DBI for access to a DB to store/retreive results.
I'm doing this to check if (tens of) webservers are up (with HEAD /)
It's often best to rely on a lib to follow 301/302 http redirects automatically rather than doing it by hand.


BTW dont rely on DNS timeout for any erroneous or non existant
.com/.net domains, since Verisign now redirects everything in their
DNS to their IP 64.94.110.11, soon flooding us with advertising things :-(

telnet www.interjinn.com 80
That will give you the OS, web server, and any PHP information.

But keep in mind that it's based on the "Server:" HTTP header: 1. Some webservers didnt send any "Server:" header 2. Some send short names (ex only "Apache") 3. Some send fake names, for security reasons

That method is not reliable, as you can see. Other methods exist
to check OS (fingerprinting) etc. But it remain quite complex.
(round-robin DNS, load balancing, caching servers, firewalls...)

Christophe

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to