$_SERVER["REMOTE_ADDR"] sometimes returns 10.0.0.2 and sometimes a hex value like fe80::d7c:2a15:b162:81c1 during the same session. Why is this happening? I’m using XAMPP.
$_SERVER[REMOTE_ADDR] sometimes returns 10.0.0.2 and sometimes a hex value like fe80::d7c:2a15:b162:81c1 during the same
Share
You seem to use the DNS name to access your server. As such, you might get either an A or an AAAA record for the DNS name. Which means, one time you access via IPv4 and the other via IPv6 (fe80::d7c:2a15:b162:81c1 is an IPv6-address).