home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2000 May
/
Chip_2000-05_cd1.bin
/
zkuste
/
Perl
/
ActivePerl-5.6.0.613.msi
/
䆊䌷䈹䈙䏵-䞅䞆䞀㡆䞃䄦䠥
/
_9c5534cc404e88efe5ccb2c8c0fd7d72
< prev
next >
Wrap
Text File
|
2000-03-23
|
5KB
|
121 lines
<HTML>
<HEAD>
<TITLE>Net::Whois - Get and parse "whois" domain data from InterNIC</TITLE>
<LINK REL="stylesheet" HREF="../../../Active.css" TYPE="text/css">
<LINK REV="made" HREF="mailto:">
</HEAD>
<BODY>
<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100%>
<TR><TD CLASS=block VALIGN=MIDDLE WIDTH=100% BGCOLOR="#cccccc">
<STRONG><P CLASS=block> Net::Whois - Get and parse "whois" domain data from InterNIC</P></STRONG>
</TD></TR>
</TABLE>
<A NAME="__index__"></A>
<!-- INDEX BEGIN -->
<UL>
<LI><A HREF="#name">NAME</A></LI><LI><A HREF="#supportedplatforms">SUPPORTED PLATFORMS</A></LI>
<LI><A HREF="#synopsis">SYNOPSIS</A></LI>
<LI><A HREF="#description">DESCRIPTION</A></LI>
<LI><A HREF="#author">AUTHOR</A></LI>
<LI><A HREF="#copyright">COPYRIGHT</A></LI>
</UL>
<!-- INDEX END -->
<HR>
<P>
<H1><A NAME="name">NAME</A></H1>
<P>Net::Whois - Get and parse ``whois'' domain data from InterNIC</P>
<P>
<HR>
<H1><A NAME="supportedplatforms">SUPPORTED PLATFORMS</A></H1>
<UL>
<LI>Linux</LI>
<LI>Solaris</LI>
<LI>Windows</LI>
</UL>
<HR>
<H1><A NAME="synopsis">SYNOPSIS</A></H1>
<P>Note that all fields except ``name'' and ``tag'' may be undef
because ``whois'' information is erratically filled in.</P>
<P>use Net::Whois;
use Carp;</P>
<PRE>
my $w = new Net::Whois::Domain $dom
or die "Can't connect to Whois server\n;</PRE>
<PRE>
unless ($w->ok) { croak "No match for $dom";}</PRE>
<PRE>
print "Domain: ", $w->domain, "\n";
print "Name: ", $w->name, "\n";
print "Tag: ", $w->tag, "\n";
print "Address:\n", map { " $_\n" } $w->address;
print "Country: ", $w->country, "\n";
print "Name Servers:\n", map { " $$_[0] ($$_[1])\n" }
@{$w->servers};
my ($c, $t);
if ($c = $w->contacts) {
print "Contacts:\n";
for $t (sort keys %$c) {
print " $t:\n";
print map { "\t$_\n" } @{$$c{$t}};
}
}
print "Record created:", $w->record_created ;
print "Record updated:", $w->record_updated ;</PRE>
<P>
<HR>
<H1><A NAME="description">DESCRIPTION</A></H1>
<P>Net::Whois::Domain <CODE>new()</CODE> attempts to retrieve and parse the given
domain's ``whois'' information from the InterNIC (whois.internic.net).
If the server could not be contacted, is too busy, or otherwise does not process
the query then the constructor does not return a reference and your object is undefined.
If the constructor returns a reference, that reference can be used to access the various
attributes of the domains' whois entry assuming that there was a match.
The member function ok returns 1 if a match 0 if no match.</P>
<P>Note that the Locale::Country module (part of the Locale-Codes
distribution) is used to recognize spelled-out country names; if that
module is not present, only two-letter country abbreviations will be
recognized.</P>
<P>The server consulted is ``whois.internic.net''. You can only
get .org, .edu, .net, .com domains from Internic. Other whois servers
for other Top-Level-Domains (TLD) return information in a different syntax
and are not supported at this time. Also, only queries for domains are
valid. Querying for a network will fail utterly since those are not
kept in the whois.internic.net server (a future enhancement will
add a network lookup function). Querying for NIC handles won't work
since they have a different return syntax than a domain. Domains other
than those listed won't work they're not in the server. A future enhancment
planned will send the query to the appropriate server based on its TLD.</P>
<P>
<HR>
<H1><A NAME="author">AUTHOR</A></H1>
<P>Originally written by Chip Salzenberg (<A HREF="mailto:chip@pobox.com">chip@pobox.com</A>)
in April of 1997 for Idle Communications, Inc.
In September of 1998 Dana Hudes (<A HREF="mailto:dhudes@hudes.org">dhudes@hudes.org</A>) found this
but it was broken and he needed it so he fixed it.
In August, 1999 Dana and Chip agreed to become co-maintainers of the module.
Dana released a new version of Net::Whois to CPAN and resumed active
development.</P>
<P>
<HR>
<H1><A NAME="copyright">COPYRIGHT</A></H1>
<P>This module is free software; you can redistribute it and/or modify
it under the same terms as Perl itself. If you make modifications,
the author would like to know so that they can be incorporated into
future releases.</P>
<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100%>
<TR><TD CLASS=block VALIGN=MIDDLE WIDTH=100% BGCOLOR="#cccccc">
<STRONG><P CLASS=block> Net::Whois - Get and parse "whois" domain data from InterNIC</P></STRONG>
</TD></TR>
</TABLE>
</BODY>
</HTML>