Does anyone know how php can do this? $_SERVER['REMOTE_HOST'] isn't it.
Also, can the reverse dns be spoofed? Or, if a user is using a http proxy, will it bring up the proxies dns?
[man]gethostbyaddr[/man] you'll get the name of the machine with the given address. So yes, if it's a proxy you'll get the name of the proxy.