NAME Net::Whois::Raw - Perl extension for unparsed raw whois information SYNOPSIS use Net::Whois::Raw qw( whois ); $s = whois('perl.com'); $s = whois('funet.fi'); $s = whois('yahoo.co.uk'); ### if you do "use Net::Whois::Raw qw( whois $OMIT_MSG $CHECK_FAIL ### $CACHE_DIR $CACHE_TIME $USE_CNAMES $TIMEOUT ); ### you can use these: $OMIT_MSG = 1; # This will attempt to strip several known copyright messages and disclaimers sorted by servers. Default is to give the whole response. $OMIT_MSG = 2; # This will try some additional stripping rules if none are known for the spcific server. $CHECK_FAIL = 1; # This will return undef if the response matches one of the known patterns for a failed search, sorted by servers. Default is to give the textual response. $CHECK_FAIL = 2; # This will match against several more rules if none are known for the specific server. $CACHE_DIR = "/var/spool/pwhois/"; # Whois information will be cached in this directory. Default is no cache. $CACHE_TIME = 24; # Cache files will be cleared after not accessed for a specific number of hours. Documents will not be cleared if they keep get requested for, independent of disk space. Default is not to clear the cache. $USE_CNAMES = 1; # Use whois-servers.net to get the whois server name when possible. Default is to use the hardcoded defaults. $TIMEOUT = 10; # Cancel the request if connection is not made within a specific number of seconds. Note: as of version 0.21, extra data will be loaded only if the OMIT_MSG or CHECK_FAIL flags were used, in order to reduce memory usage. DESCRIPTION Net::Whois::Raw queries NetworkSolutions and follows the Registrar: answer for ORG, EDU, COM and NET domains. For other TLDs it uses the whois-servers.net namespace. ($TLD.whois-servers.net). Setting the variables $OMIT_MSG and $CHECK_FAIL will match the results against a set of known patterns. The first flag will try to omit the copyright message/disclaimer, the second will attempt to determine if the search failed and return undef in such a case. IMPORTANT: these checks merely use pattern matching; they will work on several servers but certainly not on all of them. (This features were contributed by Walery Studennikov despair@sama.ru) AUTHOR Original author Ariel Brosh, schop@cpan.org, Inspired by jwhois.pl available on the net. Since Ariel has passed away in September 2002: Past maintainers Gabor Szabo, gabor@perl.org.il Current Maintainer: Corris Randall corris@cpan.org CREDITS Fixed regular expression to match hyphens. (Peter Chow, peter@interq.or.jp) Added support for Tonga TLD. (.to) (Peter Chow, peter@interq.or.jp) Added support for reverse lookup of IP addresses via the ARIN registry. (Alex Withers awithers@gonzaga.edu) This will work now for RIPE addresses as well, according to a redirection from ARIN. (Philip Hands phil@uk.alcove.com, Trevor Peirce trev@digitalcon.ca) Added the pattern matching switches, (Walery Studennikov despair@sama.ru) Modified pattern matching, added cache. (Tony L. Svanstrom tony@svanstrom.org) CHANGES 0.22 2003.01.12 After Ariel Brosh, the original author has passed away this is the first release by Gabor Szabo, the new maintainer. It comes mainly to record the change in ownership. Tests: moving test.pl to t/01.t using Test::More removing failing tests. Later I'll add more test. 0.23 Tue Mar 25 09:23:37 PST 2003 - only exports &whois by default, the other variables are exportable still. - incorporated new whois servers ( thanks Toni Mueller ) - now tests the main tlds - added some more regexen to strip out disclaimers and such ( for $OMIT_MSG > 2 ). - moved %servers to %Net::Whois::Raw::Data::servers CLARIFICATION As NetworkSolutions got most of the domains of InterNic as legacy, we start by querying their server, as this way one whois query would be sufficient for many domains. Starting at whois.internic.net or whois.crsnic.net will result in always two requests in any case. NOTE Some users complained that the die statements in the module make their CGI scripts crash. Please consult the entries on eval and die on the perlfunc manpage about exception handling in Perl. COPYRIGHT Copyright 2000-2002 Ariel Brosh. Copyright 2003-2003 Gabor Szabo. Copyright 2003-2003 Corris Randall. This package is free software. You may redistribute it or modify it under the same terms as Perl itself. I apologize for any misunderstandings caused by the lack of a clear licence in previous versions. COMMERCIAL SUPPORT Not available anymore. LEGAL Notice that registrars forbid querying their whois servers as a part of a search engine, or querying for a lot of domains by script. Also, omitting the copyright information (that was requested by users of this module) is forbidden by the registrars. SEE ALSO the perl(1) manpage, the Net::Whois manpage, the whois manpage.