Indentifying real IP address in PHP

Network 32 Comments »

Did you know that using $_SERVER['REMOTE_ADDR'] to get visitor’s IP address sometimes is not accurate? If your site’s visitor is connected to the Internet via Proxy Server then $_SERVER['REMOTE_ADDR'] in PHP just returns the the IP address of the proxy server and not the IP address of the client’s machine. $_SERVER variable might have a few more useful things available to determine the exact IP address of the client’s machine in PHP, they are HTTP_CLIENT_IP and HTTP_X_FORWARDED_FOR.
Read the rest of this entry »

WP Theme & Icons by N.Design Studio
Entries RSS Comments RSS Log in