不仅像.com或.net那样容易,还有.co.uk,.fr,.gov.rw ......?
我是否应该真正制作一个巨大的映射“tld to related whois server”,还是有更简单的方法?
答案 0 :(得分:11)
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';
}
答案 1 :(得分:4)
http://whois.net/有什么好处吗?
答案 2 :(得分:4)
PHP:
$URL = "http://www.dotnetindex.com/articles/5261-Article--AJAX-Tips-and-Tricks.asp";
$PARSED_URL = parse_url($URL);
$DOMAIN = $PARSED_URL['host'];
$ip = gethostbyname($DOMAIN);
if($ip===$DOMAIN)
{
echo "Url does not exist";
}
else
{
echo "Url exists";
}
答案 3 :(得分:2)
答案 4 :(得分:0)