Hi
I am trying to get the IP address of the website visitor in PHP. I'm expecting $_SERVER['REMOTE_HOST'] to return something like 127.0.0.1, but it's returning ::1.
Kind regards
Peter
Hi
I am trying to get the IP address of the website visitor in PHP. I'm expecting $_SERVER['REMOTE_HOST'] to return something like 127.0.0.1, but it's returning ::1.
Kind regards
Peter
There are two possibilities here:
Let know how it goes.
::1 is the IPv6 equivalent of 127.0.0.1 - see http://www.juniper.net/techpubs/software/erx/erx50x/swconfig-routing-vol1/html/ipv6-config5.html The long form of that is
0:0:0:0:0:0:0:1 - but the :: stands in for the run of 0's.