Hello all,
I'm trying to use REMOTE_ADDR. So that I could create a quick poll, show the results, but and log someone's IP.
However when I try it, it only logs my proxy server's IP.
How do I get the user's IP?
I tried this script:
$theremote = $ENV{'REMOTE_ADDR'};
$theproxy = $ENV{'HTTP_X_FORWARDED_FOR'};
if ($theproxy == "") {$realipaddress = $theremote;} else {$realipaddress = $theproxy;}
But it still doesn't work, it actually logs nothing.
Would anyone know how to circumvent this problem?
Thanks