PHP obtains the proxy server ip address used by the user, that is, the real ip address. Using www.phpchina.combbsthread-12239-1-1.html in PHP, use $ _ SERVER [REMOTE_ADDR] to obtain the IP address of the client. However, if the client uses a proxy SERVER to access the obtained IP address from the http://www.phpchina.com/bbs/thread-12239-1-1.html
Use $ _ SERVER ["REMOTE_ADDR"] in PHP to obtain the client IP address
However, if the client uses a proxy server to access
The IP address of the proxy server is obtained.
To obtain the real IP address of the client through the proxy server
Use $ _ SERVER ["HTTP_X_FORWARDED_FOR"] to read
However, not every proxy SERVER can use $ _ SERVER ["HTTP_X_FORWARDED_FOR"] to read the real IP address of the client.
Some of the messages read by this method are still the IP address of the proxy server.
Pipeline uses $ _ SERVER ["REMOTE_ADDR"] in PHP to obtain the IP address of the client. However, if the client uses a proxy SERVER to access the obtained IP address...