How to get the real IP address of the remote client from the home software PHP in the iphone caller ID

Source: Internet
Author: User
(1). REMOTE_ADDR: The IP address of the user's computer that is browsing the current page
(2). Http_x_forwarded_for: A gateway to the user's computer that browses the current page
(3). HTTP_CLIENT_IP: IP for Client
Use $_server["REMOTE_ADDR" in PHP to obtain the IP address of the client, but if the client is accessed using a proxy server, it is the IP address of the proxy server, not the real client IP address. To get the real IP address of the client through the proxy server, it is necessary to use $_server["http_x_forwarded_for" to read.
However, it is important to note that not every proxy server can use $_server["http_x_forwarded_for" to read the client's real IP, some of which are still read by this method is the proxy server IP.
It is also important to note that if the client is not accessed through a proxy server, then the value taken with $_server["http_x_forwarded_for" will be empty.

The above describes the iphone caller ID attribution to the software PHP to get the real IP address of the remote client, including the iphone caller ID to display the content of the software, I hope to be interested in PHP tutorial friends helpful.

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.