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 ?
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';
}