Domain Name Availability Check

  • gsv2com
  • Professor
  • Professor
  • User avatar
  • Posts: 776
  • Loc: Nippon

Post 3+ Months Ago

I need to write a script on my website to check whether or not a given url is available for registration.

For example, if the user typed in zend.com they'd get a result saying that this website is already taken.

Problem is, I'm not sure what the best way of doing this is or even if this is possible using php alone.

Can I just use gethostbyname() and if no IP is found assume that the url is available?

I've been put in charge of building a system for online web domain registration and I have no idea where to start. It'll be a learning experience for sure. Any advice would be greatly appreciated.
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • _Leo_
  • Proficient
  • Proficient
  • User avatar
  • Posts: 279
  • Loc: Buenos Aires, Argentina

Post 3+ Months Ago

Well, registering a domain name is not that easy. First of all, you need to be authorized to do that. Along with the autorization should come some kind of specification, RFCs you should follow in the system, external sources of information your system will have to connect in order to get domain availability, etc, etc.

Of course, I am talking about an on-line registration service like register.com

If you are planning to make a batch manual registration once a day for the list of requested domain at your home page, that's different.
  • gsv2com
  • Professor
  • Professor
  • User avatar
  • Posts: 776
  • Loc: Nippon

Post 3+ Months Ago

All I needed was a way to CHECK whether or not a website was registered. I wasn't planning on becoming a registrar. If someone signed up for hosting on our future hosting plan, we'd take their money and register using a third party such as register.com or whoever until (if) we became a register.

The solution for checking domain availability turned out to be a breeze. After downloading two people's long code on how to do this, the system administrator in the office told me about unix's whois function.

So, I did exec(whois domain.com) and eregi'd it to find "not found" or "no result". Those that didn't get caught by the eregi were noted as registered, and as it turns out the program works perfect right now. The whole thing takes about 10 lines of code. One of the tutorials I downloaded today did it in a couple hundred lines of code, so I feel like I actually accomplished something today.
  • pifua
  • Newbie
  • Newbie
  • pifua
  • Posts: 10

Post 3+ Months Ago

you have to check the WHOIS database. domain resolution is not a solution.

Post Information

  • Total Posts in this topic: 4 posts
  • Users browsing this forum: No registered users and 107 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.