Home  >  Article  >  Backend Development  >  Introduction to the differences between the three attributes of php to obtain IP (HTTP_X_FORWARDED_FOR, HTTP_VIA, REMOTE_ADDR)_PHP tutorial

Introduction to the differences between the three attributes of php to obtain IP (HTTP_X_FORWARDED_FOR, HTTP_VIA, REMOTE_ADDR)_PHP tutorial

WBOY
WBOYOriginal
2016-07-21 15:16:19872browse

1. When not using a proxy server:

REMOTE_ADDR = Your IP
HTTP_VIA = No value or not displayed
HTTP_X_FORWARDED_FOR = No value or not displayed

2. The use of transparent proxy servers: Transparent Proxies

REMOTE_ADDR = Last proxy server IP
HTTP_VIA = Proxy server IP
HTTP_X_FORWARDED_FOR = Your real IP, When passing through multiple proxy servers, this value is similar to the following: 203.98.182.163, 203.98.182.163, 203.129.72.215.

This type of proxy server still forwards your information to the person you visit, and cannot achieve the purpose of hiding your true identity.

3. When using ordinary anonymous proxy servers: Anonymous Proxies

REMOTE_ADDR = Last proxy server IP
HTTP_VIA = Proxy server IP
HTTP_X_FORWARDED_FOR = Proxy server IP, when passing through multiple proxy servers, this value is similar to the following: 203.98.182.163, 203.98.182.163, 203.129.72.215.

Hide your real IP, but reveal to your visitors that you are using a proxy server to access them.

4. The use of deceptive proxy servers: Distorting Proxies

REMOTE_ADDR = proxy server IP
HTTP_VIA = proxy server IP
HTTP_X_FORWARDED_FOR = random IP, when passing through multiple proxy servers, this value is similar to the following: 203.98.182.163, 203.98.182.163, 203.129.72.215.

Tell the visitor that you are using a proxy server, but make up a fake random IP instead of your real IP to trick it.

5. When using high-anonymity proxy servers: High Anonymity Proxies (Elite proxies)

REMOTE_ADDR = Proxy server IP
HTTP_VIA = No value or not displayed
HTTP_X_FORWARDED_FOR = No value or not displayed. When passing through multiple proxy servers, the value is similar to the following: 203.98.182.163, 203.98.182.163, 203.129.72.215.

Completely replaces all your information with the proxy server's information, just like you are using that proxy server to directly access the object.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/325953.htmlTechArticle1. When no proxy server is used: REMOTE_ADDR = Your IP HTTP_VIA = No value or no display HTTP_X_FORWARDED_FOR = None The value may not be displayed. 2. Using a transparent proxy server...
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