For one of the coolest features of our Tools project I needed to be able to accurately determine domain availability. Here’s what I came up with:
$domain_ext = array(
‘.com’ => array(’whois.crsnic.net’,'No match for’),
‘.net’ => array(’whois.crsnic.net’,'No match for’),
‘.biz’ => array(’whois.biz’,'Not found’),
‘.mobi’ => array(’whois.dotmobiregistry.net’, ‘NOT FOUND’),
‘.tv’ => array(’whois.nic.tv’, ‘No match for’),
‘.in’ => array(’whois.inregistry.net’, ‘NOT FOUND’),
‘.info’ => array(’whois.afilias.net’,'NOT FOUND’),
‘.co.uk’ => array(’whois.nic.uk’,'No match’),
‘.co.ug’ => array(’wawa.eahd.or.ug’,'No entries found’),
‘.or.ug’ => array(’wawa.eahd.or.ug’,'No entries found’),
‘.nl’ => array(’whois.domain-registry.nl’,'is free’),
‘.ro’ => array(’whois.rotld.ro’,'No entries found for the selected’),
‘.com.au’ => array(’whois.ausregistry.net.au’,'No Data Found’),
‘.ca’ => array(’whois.cira.ca’, ‘AVAIL’),
‘.org.uk’ => array(’whois.nic.uk’,'No match’),
‘.name’ => array(’whois.nic.name’,'No match’),
‘.us’ => array(’whois.nic.us’,'Not found’),
‘.ac.ug’ => array(’wawa.eahd.or.ug’,'No entries found’),
‘.ne.ug’ => array(’wawa.eahd.or.ug’,'No entries found’),
‘.sc.ug’ => array(’wawa.eahd.or.ug’,'No entries found’),
‘.ws’ => array(’whois.website.ws’,'No Match’),
‘.be’ => array(’whois.ripe.net’,'FREE’),
‘.com.cn’ => array(’whois.cnnic.cn’,'no matching record’),
‘.net.cn’ => array(’whois.cnnic.cn’,'no matching record’),
‘.org.cn’ => array(’whois.cnnic.cn’,'no matching record’),
‘.no’ => array(’whois.norid.no’,'no matches’),
‘.se’ => array(’whois.nic-se.se’,'not found’),
‘.nu’ => array(’whois.nic.nu’,'NO MATCH for’),
‘.com.tw’ => array(’whois.twnic.net’,'No Found’),
‘.net.tw’ => array(’whois.twnic.net’,'No Found’),
‘.org.tw’ => array(’whois.twnic.net’,'No Found’),
‘.cc’ => array(’whois.nic.cc’,'No match’),
‘.nl’ => array(’whois.domain-registry.nl’,'is free’),
‘.pl’ => array(’whois.dns.pl’,'No information about’),
‘.pt’ => array(’whois.dns.pt’,'no match’),
‘.org’ => array(’whois.pir.org’,'NOT FOUND’)
);
If I had time, I’d add a 3rd field which would be the response when the domain IS available.