0
$_POST['url'] = 'fight.com';
$host = gethostbyname($_POST['url']); //get IP
echo $host . " ";
$ip = gethostbyaddr($host); //get hostname
echo $ip;
预期的正确结果为:为什么gethostbyaddr()返回不同的结果?
50.31.210.85 unknown.servercentral.net
而就是当我测试它http://writecodeonline.com/php/
但是,当我在我的Windows机器上运行此代码,我得到:
50.31.210.85 fight.com
我测试了很多不同的域,是不是Windows的原因还是其他一些配置问题?