Link to home
Start Free TrialLog in
Avatar of andrewyu
andrewyu

asked on

domain name

How can I check a domain name is valid or not ?

Andrew
Avatar of RONSLOW
RONSLOW

do you mean valid syntax, or if it is the name of an actual domain?

ASKER CERTIFIED SOLUTION
Avatar of OM
OM

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
that is hardly an answer
I'am really sorry, I mis-checked the Answer box.
Andrew, please, reject the answer. And update the
number of points if you really want an answer.

andrewyu ... are you still out there ?

Avatar of andrewyu

ASKER

Sorry, I don't have any more point !!!!!!
BUT .. you havne't answered OUR questions.

Do you want to check the syntax of a domain name (ie. does this string look like a legal domain name) or to check that it is actually an existing domain name (is there a domain with this name)??
I want to write a program to check whether a domain name is reserved or not ?

Andrew
aha .. that probably means getting at the databases of reserved names.  A domain name could be reserved without a server actually using it at any given time.  But unfortunately this is not my area of expertise ... OM ??

As far as I know "reserved" name means "used". This is not
completely exact, since there are delay of propagation which
could entrain some wrong answer.
As I said before, this is not so trivial to ask for domain
name since you have to query a NS.
In an approximate way you should test for the existence (i.e.
registering) of a machine called www.domain.name, with
a gethostbyname() call.