Net::WhoisNG is a Perl extension for whois and parsing.
my $w=new Net::WhoisNG($domain);
print "Domain not Found
# If lookup is successful, record is parsed and ready for use
Single Value properties return respective scalars from their getXX methods.
The available single value getXX method are getExpirationDate(), getLastUpdated(),
Obtaining name servers is done with getNameServers() which returns a reference to an
array of name servers.
Contacts are implemeted as a person object.
'type' is one of (admin,tech,registrant,bill)
The Person Object implements several methods to obtain properties of the contact
$contact->getCredentials(); #Returns a ref to an array of contact info for $type
getCredentials() was implemeted to return an unparsed set of info about a contact beacause some
whois servers are so irregular in their formatting that it was a impractical to
parse the contact info further. Where available such as with .org and .info the following methods work.
getName(), getOrganization(), getState(), getPostalCode, getCountry(), getEmail(),
getStreet(), getPhone(), getFax()
you can get an XML representation of the Data if you the the optional XML::simple module by calling
Whois Next Generation. Whois lookup module alternative to Net::Whois
This module is used to lookup whois information on domains.
This version supports the com, net, org, info, biz, us and edu TLDs. Rapidly implementing other TLDs.
next in line .co.uk .org.uk .net.uk. I think these all have the same format so will only need one implementation. let me know which ones you'd want implemented sooner than others.
The module starts by examinig the extension and setting the appropriate whois server. The whois server URL is constructed as $tld.whois-servers.net. The method lookUp() then tries to connect and query the server. It then hands over to a parser and returns 1 if successful or 0 otherwise. U can then obtain various properties using methods listed above. Note that not all properties will be defined for every domain.