I have two IP Web pages, both on the same server, and both I am
accessing with the same browser.
On both pages I have this code:
if(getenv("HTTP _CLIENT_IP")) {
$ip = getenv("HTTP_CL IENT_IP");
} elseif(getenv(" HTTP_X_FORWARDE D_FOR")) {
$ip = getenv("HTTP_X_ FORWARDED_FOR") ;
} else {
$ip = getenv("REMOTE_ ADDR");
}
Here's the weird part. When I echo $ip on one page I get my actual
public IP address, which I can verify as accurate by looking at my
router settings and using other people's Web pages that display IP
addresses like grc.com.
But on the other page, I get a COMPLETELY different IP address that
also keeps changing the last octet every so few times I refresh the
page. I can't even ping this IP address.
Same code, both pages. Viewing with same browser on same PC.
How is this even possible??
Any suggestions?
Liam
accessing with the same browser.
On both pages I have this code:
if(getenv("HTTP _CLIENT_IP")) {
$ip = getenv("HTTP_CL IENT_IP");
} elseif(getenv(" HTTP_X_FORWARDE D_FOR")) {
$ip = getenv("HTTP_X_ FORWARDED_FOR") ;
} else {
$ip = getenv("REMOTE_ ADDR");
}
Here's the weird part. When I echo $ip on one page I get my actual
public IP address, which I can verify as accurate by looking at my
router settings and using other people's Web pages that display IP
addresses like grc.com.
But on the other page, I get a COMPLETELY different IP address that
also keeps changing the last octet every so few times I refresh the
page. I can't even ping this IP address.
Same code, both pages. Viewing with same browser on same PC.
How is this even possible??
Any suggestions?
Liam
Comment