From http://www.phpchina.com/bbs/thread-12239-1-1.html
Use $_SERVER["REMOTE_ADDR"] in PHP to obtain the client's IP address
But if If the client uses a proxy server to access
, what it gets is the IP address of the proxy server
If you want to get the real IP address of the client through the proxy server
you need to Use $_SERVER["HTTP_X_FORWARDED_FOR"] to read
But not every proxy server can use $_SERVER["HTTP_X_FORWARDED_FOR"] to read the real IP of the client
Some use this What the method reads is still the IP of the proxy server