2 Net::Whois::Raw - Perl extension for unparsed raw whois information
5 use Net::Whois::Raw qw( whois );
7 $s = whois('perl.com');
8 $s = whois('funet.fi');
9 $s = whois('yahoo.co.uk');
11 ### if you do "use Net::Whois::Raw qw( whois $OMIT_MSG $CHECK_FAIL
12 ### $CACHE_DIR $CACHE_TIME $USE_CNAMES $TIMEOUT );
13 ### you can use these:
15 $OMIT_MSG = 1; # This will attempt to strip several known copyright
16 messages and disclaimers sorted by servers.
17 Default is to give the whole response.
19 $OMIT_MSG = 2; # This will try some additional stripping rules
20 if none are known for the spcific server.
22 $CHECK_FAIL = 1; # This will return undef if the response matches
23 one of the known patterns for a failed search,
25 Default is to give the textual response.
27 $CHECK_FAIL = 2; # This will match against several more rules
28 if none are known for the specific server.
30 $CACHE_DIR = "/var/spool/pwhois/"; # Whois information will be
31 cached in this directory. Default is no cache.
33 $CACHE_TIME = 24; # Cache files will be cleared after not accessed
34 for a specific number of hours. Documents will not be
35 cleared if they keep get requested for, independent
36 of disk space. Default is not to clear the cache.
38 $USE_CNAMES = 1; # Use whois-servers.net to get the whois server
39 name when possible. Default is to use the
42 $TIMEOUT = 10; # Cancel the request if connection is not made within
43 a specific number of seconds.
45 Note: as of version 0.21, extra data will be loaded only if the
46 OMIT_MSG or CHECK_FAIL flags were used, in order to reduce memory usage.
49 Net::Whois::Raw queries NetworkSolutions and follows the Registrar:
50 answer for ORG, EDU, COM and NET domains. For other TLDs it uses the
51 whois-servers.net namespace. ($TLD.whois-servers.net).
53 Setting the variables $OMIT_MSG and $CHECK_FAIL will match the results
54 against a set of known patterns. The first flag will try to omit the
55 copyright message/disclaimer, the second will attempt to determine if
56 the search failed and return undef in such a case.
58 IMPORTANT: these checks merely use pattern matching; they will work on
59 several servers but certainly not on all of them.
61 (This features were contributed by Walery Studennikov despair@sama.ru)
64 Original author Ariel Brosh, schop@cpan.org, Inspired by jwhois.pl
67 Since Ariel has passed away in September 2002:
69 Past maintainers Gabor Szabo, gabor@perl.org.il, Corris Randall
72 Current Maintainer: Walery Studennikov despair@cpan.org
75 Fixed regular expression to match hyphens. (Peter Chow,
78 Added support for Tonga TLD. (.to) (Peter Chow, peter@interq.or.jp)
80 Added support for reverse lookup of IP addresses via the ARIN registry.
81 (Alex Withers awithers@gonzaga.edu)
83 This will work now for RIPE addresses as well, according to a
84 redirection from ARIN. (Philip Hands phil@uk.alcove.com, Trevor Peirce
87 Added the pattern matching switches, (Walery Studennikov
90 Modified pattern matching, added cache. (Tony L. Svanstrom
94 See file "Changes" in the distribution
97 As NetworkSolutions got most of the domains of InterNic as legacy, we
98 start by querying their server, as this way one whois query would be
99 sufficient for many domains. Starting at whois.internic.net or
100 whois.crsnic.net will result in always two requests in any case.
103 Some users complained that the die statements in the module make their
104 CGI scripts crash. Please consult the entries on eval and die on
105 perlfunc about exception handling in Perl.
108 Copyright 2000-2002 Ariel Brosh. Copyright 2003-2003 Gabor Szabo.
109 Copyright 2003-2003 Corris Randall. Copyright 2003-2003 Walery
112 This package is free software. You may redistribute it or modify it
113 under the same terms as Perl itself.
115 I apologize for any misunderstandings caused by the lack of a clear
116 licence in previous versions.
119 Not available anymore.
122 Notice that registrars forbid querying their whois servers as a part of
123 a search engine, or querying for a lot of domains by script. Also,
124 omitting the copyright information (that was requested by users of this
125 module) is forbidden by the registrars.
128 perl(1), Net::Whois, whois.