Page 1 of 1

IP Address Invalid with PHP

PostPosted: 10. May 2010 14:40
by hamasaki
Hello,

Been a user of Xampp for awhile now, always brilliant, never any issues. Many thanks. :)

I recently installed Xampp on my new Windows7 laptop. If I use PHP to echo my IP address via:

echo $_SERVER['REMOTE_ADDR'];

Instead of 127.0.0.1 I see ::1

Anyone got any ideas as to why this happens?

Thanks
h.

Re: IP Address Invalid with PHP

PostPosted: 10. May 2010 15:45
by Wiedmann
Because "::1" is a valid IPv6 address (localhost address), and your browser is making the request from this ip.

Re: IP Address Invalid with PHP

PostPosted: 11. May 2010 08:53
by hamasaki
Thank you very much.