I'm tinkering with a script to let people see if a domain is available to register or not.
The best way I've found so far is to use a whois script and then see if the response includes the words "Not found". I've had success with the one from here (near bottom):
Except I have the problem that it matches too generally, if I search for "microsoft.com" I get lots of jokes like:
So, I'm guessing if someone searched for example.com and someone else was using example.com.another-domain
.com it's going to return that and my script, not finding a "Not found" message will claim the domain is taken even if example.com is in fact free.
Any suggestions? Is there a way I can stop matching these sub domains or does someone have a suggestion for a better script altogether? I mean, I don't need whois info, only a Yes or No when it comes to is a domain free or not.