Home >Backend Development >PHP Tutorial >How to get the real IP address of the remote client in iPhone caller ID software in PHP

How to get the real IP address of the remote client in iPhone caller ID software in PHP

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-07-29 08:46:221352browse

(1).REMOTE_ADDR: The IP address of the user's computer browsing the current page
(2).HTTP_X_FORWARDED_FOR: The gateway of the user's computer browsing the current page
(3).HTTP_CLIENT_IP: The client's IP
Use $_SERVER["REMOTE_ADDR" in PHP "] to obtain the client's IP address, but if the client uses a proxy server to access, what is obtained is the IP address of the proxy server, not the real client IP address. To obtain the client's real IP address through a proxy server, use $_SERVER["HTTP_X_FORWARDED_FOR"] to read it.
But please note that not every proxy server can use $_SERVER["HTTP_X_FORWARDED_FOR"] to read the real IP of the client. Some of the IPs read by this method are still the IP of the proxy server.
Another thing to note is that if the client does not access through a proxy server, the value obtained with $_SERVER["HTTP_X_FORWARDED_FOR"] will be empty.

The above introduces the method of obtaining the real IP address of the remote client in the iPhone caller ID software PHP, including the content of the iPhone caller ID software. I hope it will be helpful to friends who are interested in PHP tutorials.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn