PHP Get real IP analog IP Hide IP proxy IP Camouflage IP High Stealth proxy stealth proxy transparent proxy IP
I have a rough list of 6 PHP industry, international major open source system to obtain the user real IP case (including Magento Zencart Zend Framework Yii ... The domestic will not mention it! Kill me! ):
PHP Get user Real IP Method 1:
PHP Get user Real IP Method 2:
PHP Get user Real IP Method 3:
PHP Get user Real IP Method 4:
PHP Get user Real IP Method 5:
PHP Get user Real IP Method 6:
Get the user's true IP principle:
Sir after reading the industry commonly used to obtain the user real IP method, found that there is a common law, the main core is
Http_client_ip
Http_x_forwarded_for
Remote_addr
Different evolution, just code compatibility!
How do I impersonate a user's real IP?
Q: If you can forge analog http_client_ip, forge analog http_x_forwarded_for, forge analog remote_addr, can not be traced to the end of the user's real IP?
A : Upstairs understand exactly right ! If you do this completely can kill 99% to get the user real IP, the user IP as the identity of the system!
(Curl, socket, Fsocketopen, stream_socket_client):
How to simulate http_client_ip? Http_client_ip can be simulated? Camouflage http_client_ip!
curl_setopt ($curl, Curlopt_httpheader, Array ( ' client_ip: '. Mt_rand (0, 255). '. Mt_rand (0, 255). '. '. Mt_rand (0, 255). '. '. Mt_rand (0, 255),);//Advantages: Low cost of counterfeiting, kill 90% system
How to simulate http_x_forwarded_for? Http_x_forwarded_for can be simulated? Camouflage http_x_forwarded_for!
curl_setopt ($curl, Curlopt_httpheader, Array ( ' x-forwarded-for: '. Mt_rand (0, 255). '. Mt_rand (0, 255). '. '. Mt_rand (0, 255). '. '. Mt_rand (0, 255),);//Advantages: Low cost of counterfeiting, kill 90% system
How to simulate REMOTE_ADDR? REMOTE_ADDR can be simulated? Camouflage remote_addr!
curl_setopt ($curl, Curlopt_proxytype, curlproxy_http); curl_setopt ($curl, Curlopt_proxy, ' 1.1.1.1:8080 ');// Baidu to obtain a proxy IP can be, high stealth proxy IP better! Pros: Kill 100% System