echo var_dump(gethostbyaddr('66.249.79.58'))."
";
echo var_dump(gethostbyaddr('220.181.108.160'));
?>
输出结果为
string(32) "crawl-66-249-79-58.googlebot.com"
string(43) "baiduspider-220-181-108-160.crawl.baidu.com"
如果为普通用户则输出ip地址
echo var_dump(gethostbyaddr('66.249.79.58'))."
";
echo var_dump(gethostbyaddr('220.181.108.160'));
?>
输出结果为
string(32) "crawl-66-249-79-58.googlebot.com"
string(43) "baiduspider-220-181-108-160.crawl.baidu.com"
如果为普通用户则输出ip地址