So you want to something like what http://www.netcraft.com/ has (they have quite a bit on how they do their thing)?
Basically, you could open a socket connection with their site, ask for some simple default page ("http://www.example.com/", for example), and then grovel through the headers in what is returned to see what information it contains.
For example, using the code on the [man]fsockopen[/man] page, I determined that Netcraft themselves are running Apache 1.3.26 (with mod_perl) on a Unix platform.