不仅是像 .com 或 .net 这样简单的,还有 .co.uk、.fr、.gov.rw ......?
我真的应该制作一个巨大的映射“tld 到相关的 whois 服务器”,还是有更简单的方法?
最佳答案
http://php.net/manual/en/function.checkdnsrr.php
if (checkdnsrr('test.nl', 'A')) // or use ANY or for other see above link
{
echo 'Domain exists';
}
else
{
echo 'Domain does not exist';
}
关于language-agnostic - 如何检查域名是否存在?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/460816/