Some visiters will visit a web site via a proxy in order to hide his real ip, how to use php to check out the real ip?
oh, i have a function to check visitor's real ip address: function getRealIpAddr() { if (!empty($_SERVER['HTTP_CLIENT_IP'])) { $ip=$_SERVER['HTTP_CLIENT_IP']; } else if (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) { $ip=$_SERVER['HTTP_X_FORWARDED_FOR']; } else { $ip=$_SERVER['REMOTE_ADDR']; } return $ip; } Code (markup): one thing make me wonder. If we can know the real visitor's IP address,what is the use of proxy?
The levels of proxy: Transparent & Anonymous - Reveals real IP Elite - Does not reveal it's a proxy. Get an elite proxy and browse to your script, it won't detect your real IP. Jay