I use the command:
$ip=$_SERVER['REMOTE_ADDR'];
to get the ip address.
IE gives me the ip address of my machine and Firefox gives me the Default Gateway.
Why is this happening?
How can I get the ip address when using a proxy?
Thanks in advance! 🙂
If both browsers from the same source machine to the same destination are giving different IP addresses then either:
As it’s you running the browsers I think it’s safe to assume you’re not spoofing the IP address. This must mean that one browser is using a proxy and the other isn’t. Double check your browser settings regarding proxies.
As an aside, this should also be an important lesson regarding the REMOTE_ADDR field in particular and user-supplied input in general. namely, you can’t trust it to be accurate.