Hello,

Simply, I just want the user enter a domain name and the script check if it's registered or no?!

If it's registered print "yes" otherwise print "no"!

Note: I prefer not contacting any third party.

Thank you.

    2 months later

    I am interested in the same thing... anyone know how to do it?

      Of course you know you can get such information from websites that offer domain registration. Right?

        I offer registration and need it for my customers to check domains (so if they enter a domain they want to register it will check if it's taken or not)..

          I don't think there is an easy way, ESPECIALLY not without relying on third parties.

          InterNIC ( http://www.internic.net/ ) handles all the registrations I believe, but I don't think theres any one central way to tell. Even the registrars don't even know, there are some domain names that report as registered on Network Solutions site that are reported as unregistered on GoDaddy.com

          You could ping a domainname or request a pge from it to get a geneal idea of whether a website was there or not... but thats not really telling you if its registered or not.

          You might also look at WhoIs tools, but these rely on third parties. The PHP fsockopen() page has some good stuff:
          http://www.php.net/manual/en/function.fsockopen.php

          Maybe you can mirror the main ICANN DNS servers... but I have a feeling that'd be a bit of a big project...

            Likely you have to pay for the service - pay and get the codes and instructions.

              I did this while working on a project for network solutions. I'ts been a few years, but I'm pretty sure we used whois to figure it out.

              For instance, this is the output from an available domain:

              [me@comp dir]$ whois etreeeee.com
              [whois.crsnic.net]

              Whois Server Version 1.3

              Domain names in the .com and .net domains can now be registered
              with many different competing registrars. Go to http://www.internic.net
              for detailed information.

              No match for "ETREEEEE.COM".

              Last update of whois database: Thu, 1 May 2003 06:00:35 EDT <<<

              plus a lot of other junk.

              This is an unavailable domain match:
              [me@comp dir]$ whois etree.com
              [whois.crsnic.net]

              Whois Server Version 1.3

              Domain names in the .com and .net domains can now be registered
              with many different competing registrars. Go to http://www.internic.net
              for detailed information.

              Domain Name: ETREE.COM
              Registrar: NETWORK SOLUTIONS, INC.
              Whois Server: whois.networksolutions.com

              So all you need to do is something similar to

              $res = strstr(whois $somedomain, "No match for \"$somedomain\"");

                Write a Reply...