Jump to content

[SOLVED] Check Domain Availability


eutu9

Recommended Posts

I want to wite a PHP script to Check Domain Availability !

 

I tried to use checkdnsr function!

But it doesn't works for all types of dns records.

The default option is "MX".

 

if (checkdnsr($x,"ANY")){

  echo "The domain is not available!";

}

else

{

echo "The domain si available!";

}

 

Is this correct ?

 

It doesn't works! If I enter an available record to search it says: "the domain is not available"!

Why :(( ?

 

Could you give me another script ?

Or some tutorials!

pls  :S

 

Thanks!

Link to comment
Share on other sites

Some regesterd domains wont have a valied DNS record attached!  May just be held, or pointing to a server with no record.  The only way to acuratly check domain avalibility is through the use of a 'whois' server.  checkdnsr is for domains with a record, not for the porpos your using it for.

 

Hope this helps.

Link to comment
Share on other sites

Thank you 4 your help falks!  :-*

 

Now,

next question! ;)

 

For each top level domain I have to query another server?

For example:

for .com domains i have to query networksolutions.com ....

 

Can I find a server to query all top leve domains ?

 

Thx!  ;D

Link to comment
Share on other sites

Not realy!  Sorry! I dont know of any free ones, due to the amount of trafic they would get.  However whoever you bying your domains from will probaby provide one.  Often there used in conjunction with fopen().

 

Sorry i cant help more with that.  Whois is realy the only way to do it acuratly tough.

 

(after though.  If your running unix based OS, type whois adomain.com into the prompt.  Perhaps you can feed it through this way).

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.