Hello,

Would love to see a new module for this that allows WHOIS lookups to check domain availability and then registration of domain names.

Brett

Comments

gordon’s picture

This wouldn't be too hard. There are a couple of pear modules http://pear.php.net/package/Net_Whois which allows the lookup, and the other things could be done as well.

mgifford’s picture

I followed up with this here:
http://www.openconcept.ca/whois_source

Tried to post it here but got an error.

Mike

mgifford’s picture

Status: Active » Fixed

Well.. It's not really a patch issue.. but a viable solution..

Could use review..

ñull’s picture

WHOIS is not available for all domains. A durty dns lookup is. The following snippet could be used to check availability on the basis of existing DNS entry.

 if ($_GET['Submit']=="Check")
 {
  if (eregi("^[a-z0-9-]+(\.[a-z0-9-]+)*$",$_GET['domain']))
  {
   if (checkdnsrr ($_GET['domain'],"ANY"))
   {
     $errtxt="Already registered. Choose another.<br>";
   }
   else
   {
    $errtxt="Not registered</ br>";
   }
  }
  else
  {
   $errtxt="Invalid domain name</ br>";
  }
 }

if ($errtxt!='') echo $errtxt;
allie micka’s picture

This is a backwards discussion. You shouldn't need to worry about whois queries because availability is usually accessible from the registrar API.

Look at integrating Tucows, Directi, enom, etc. and you'll have your availability checking.

Anonymous’s picture

Status: Fixed » Closed (fixed)