Search code examples
phpspoofingserver-variables

$_SERVER['REMOTE_HOST'] empty for some users


I have activated

HostnameLookups Double

in my Apache2 configuration, so that I can store user's remote hosts and rest assured that their IP addresses are real and not spoofed.

However, I noticed that for quite a few of my 'users' (people entering a form), the $_SERVER['REMOTE_HOST'] is just empty (while for most others it is nonempty), despite the above configuration. Does this mean that these users have spoofed IP adresses, or could these still be honest and regular users? What else could explain this?


Solution

  • Not every host has a host name :)

    You probably wanted to use 'REMOTE_ADDR'