Finally, write a useful thing!
Ability to detect most IPs accessed through a proxy server.
Beiji.com 2000.6.17
$ip = getenv ("REMOTE_ADDR");
$v = getenv ("Http_via");
$f = getenv ("Http_x_forwarded_for");
$c = getenv ("http_xroxy_connection");
$o = getenv ("Http_pragma");
print '
REMOTE_ADDR ';
Print $ip;
if ($v = = "") && ($f = = "") && ($c = = "") && ($o = = "")) {
Print "
Not through proxy ";
}
else {
Print "
Through proxy ";
print '
Http_via: ';p rint $v;
print '
Http_x_forwarded_for: ';p rint $f;
print '
Http_xroxy_connection: ';p rint $c;
print '
Http_pragma: ';p rint $o;
}
?>
http://www.bkjia.com/PHPjc/315807.html www.bkjia.com true http://www.bkjia.com/PHPjc/315807.html techarticle Finally, write a useful thing! Ability to detect most IPs accessed through a proxy server. ? php//beiji.com2000.6.17 $ip = getenv (REMOTE_ADDR); $v = getenv (Http_via); $f = getenv (H ...