Posted by Janwillem Borleffs on 08/21/06 21:11
Steven Paul wrote:
> I'm using
>
> $ip = isset($_SERVER['HTTP_X_FORWARDED_FOR']) ?
> $_SERVER['HTTP_X_FORWARDED_FOR'] : $_SERVER['REMOTE_ADDR'];
>
> to get a visitor's IP address, but every once in a while I get
> "unknown, unknown" instead of an address. Is there something I'm
> leaving out?
>
It's probable that your server environment uses another variable
(HTTP_CLIENT_IP for instance).
Examin the printout of the phpinfo() function to find the correct key.
JW
[Back to original message]
|