0
如何找到欺騙性IP地址的原始IP地址?是否有任何工具可以找出?識別欺騙性地址
如何找到欺騙性IP地址的原始IP地址?是否有任何工具可以找出?識別欺騙性地址
這應該做的伎倆:
function check_spoofed_ip()
{
//Check Ip in HTTP Header
if (!empty($_SERVER['HTTP_CLIENT_IP']))
{
$ip=$_SERVER['HTTP_CLIENT_IP'];
}
//Is it Proxy Forwarded?
elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR']))
{
$ip=$_SERVER['HTTP_X_FORWARDED_FOR'];
}
//Check @ Last, Normal Scenario
else
{
$ip=$_SERVER['REMOTE_ADDR'];
}
return $ip; //Returns Real IP
}
這屬於serverfault – 2010-07-25 15:31:13