troubleshooting Question

PHP Domain availability check

Avatar of KKPeters
KKPeters asked on
PHP
4 Comments1 Solution778 ViewsLast Modified:
Hi all,

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):

http://www.webhostingtalk.com/showthread.php?threadid=231463

Except I have the problem that it matches too generally, if I search for "microsoft.com" I get lots of jokes like:

MICROSOFT.COM.RUNS.ON.AN.8088.ORG
MICROSOFT.COM.RAWKZ.MUH.WERLD.MENTALFLOSS.CA
MICROSOFT.COM.OHMYGODITBURNS.COM

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.
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 4 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 4 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros