Browsing articles from "December, 2008"
Dec
4
2008

Get Real IP address and proxy of visitor in PHP

$_SERVER['REMOTE_ADDR'] or getenv(’REMOTE_ADDR’) is often used to find the remote users or visitors IP address on a website. But this value may not be the real ip address of the user who just visited the site. If the user is behind a proxy then the value of $_SERVER['REMOTE_ADDR'] will the IP address of the proxy server rather than the real user. The $_SERVER super global has more fields which can be used to indicate the [...]