Hi,
not sure about the REMOTE_ADDR, I've never had any problems with it. To get
an IP from a URI try this:
use Socket;
$referral_address = $ENV{'HTTP_REFERER'};
$referral_address =~ m#^.*http://([^/]+)/.*$#;
$IP = inet_ntoa inet_aton $1;
If you want the IP address in hex, just use inet_aton.
Hi all,
Can you help me with this?
I want to get the servers IP address and the IP address of the referrer. Is
there a reliable way to do this? When I used 'REMOTE_ADDR' I get different
values even when I go directly to my site and then call 'REMOTE_ADDR'. Does
anyone know why? I