You want to find out who owns a domain, as if you’d used the
Use the CPAN module Net::Whois:
use Net::Whois; $domain_obj = Net::Whois::Domain->new($domain_name) or die "Couldn't get information on $domain_name: $!\n"; # call methods on $domain_obj to get name, tag, address, etc.
Whois is a service provided by domain name registration authorities
to identify owners of domain names. Historically, queries were made
whois (1) program on Unix systems,
which returned about fifteen lines of information, including the
names, addresses, and phone numbers of the administrative, technical,
and billing contacts for the domain.
Net::Whois module is a client for the whois
service, just like
whois (1). It connects to a
whois server (the default is
the master server for the
".edu" domains) and gives you access to the
information through method calls on an object.
To request information on a domain, create a new Net::Whois::Domain
object. For instance, to look up information on
$d = Net::Whois::Domain->new( "perl.org" ) or die "Can't get information on perl.org\n";
The only guaranteed fields are the domain name and the tag— the domain’s unique identifier in the NIC records:
print "The domain is called ", $d->domain, "\n"; print "Its tag is ", $d->tag, "\n";
Information that may be present includes: name of the domain’s company or product ...