終於寫出有用的東西了!
能夠偵測大部分透過代理伺服器存取的ip.
//beiji.com 2000.6.17
$ip = getenv("REMOTE_ADDR"); getenv("HTTP_VIA");
$f = getenv("HTTP_X_FORWARDED_FOR");
$c = getenv("HTTP_XROXY_CONNECTION"); 🎜>print '
REMOTE_ADDR';
print $ip;
if (($v=="")&&($f=="")&&($c=="" )&&($o=="")){
print "
not through proxy";
}
else {
print "
through proxy"; '
http_via: ';print $v;
print '
http_x_forwarded_for: ';print $f;
print '
http_xroxy_connection: ';print $c;
print '
print 'http_pragma: ';print $o;
}
?>
http://www.bkjia.com/PHPjc/315807.html
www.bkjia.com