Looking to Build/Redesign a Website or Blog ?

To speak to Rakshit, call +91 968 704 2303

February 8, 2010

6 Comments

Get Visitors Real IP Address in PHP

If you want track visitor's or user's IP address than you may use $_SERVER['REMOTE_ADDR']. Well, you might be shocked to know that it may not return the real IP address of the visitor/user at all time. Here are the cases when it happens. If visitor/user is connected to the Internet through Proxy Server then $_SERVER['REMOTE_ADDR'] in PHP will give the IP address of the proxy server and it will not be visitor's/user's IP address.