How accurately can a domain name\'s availibility be determined by checking for the existence of NS or SOA (Start of Authority)
If you plan to do bulk checks you will be soon disappointed by the built-in DNS resolver - it is synchronous. There is a nice cute library called ADNS (http://www.gnu.org/software/adns/) which offers asynchronous DNS queries. It is accompanied by a small command-line tool adnshost which I am using in combination with N-DJBDNS (http://pjp.dgplug.org/ndjbdns/) as a recursive resolver.
The exact arguments are adnshost -a -tns -f
The 4th column in the output will contain the result code:
Checking 1.2M domain names takes about 4-6 hours but this will vary with network speed/congestion.