How do you check if a domain name exists?
问题 Not only easy ones like .com or .net, but also, .co.uk, .fr, .gov.rw ... ? Should I really make a huge mapping "tld to relevant whois server", or is there an easier way ? 回答1: 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'; } 回答2: http://whois.net/ any good? 回答3: PHP: $URL = "http://www.dotnetindex.com/articles/5261-Article--AJAX-Tips-and-Tricks.asp";