1IP(3)                 User Contributed Perl Documentation                IP(3)
2
3
4

NAME

6       Net::Whois::IP - Perl extension for looking up the whois information
7       for ip addresses
8

SYNOPSIS

10         use Net::Whois::IP qw(whoisip_query);
11
12         my $ip = "192.168.1.1";
13       #Response will be a reference to a hash containing all information
14       #provided by the whois registrar
15       #The array_of_responses is a reference to an array containing references
16       #to hashes containing each level of query done.  For example,
17       #many records have to be searched several times to
18       #get to the correct information, this array contains the responses
19       #from each level
20         my ($response,$array_of_responses) = whoisip_query($ip,$optional_multiple_flag,$option_array_of_search_options);
21       #if $optional_multiple_flag is not null, all possible responses for a give record will be returned
22       #for example, normally only the last instance of Tech phone will be give if record
23       #contains more than one, however, setting this flag to a not null will return both is an array.
24       #The other consequence, is that all records returned become references to an array and must be
25       #dereferenced to utilize
26       #If $option_array_of_search_options is not null, the first two entries will be used to replace
27       #TechPhone and OrgTechPhone is the search method.  This is fairly dangerous, and can
28       #cause the module not to work at all if set incorrectly
29
30       #Normal unwrap of $response ($optional_multiple_flag not set)
31        my $response = whoisip_query($ip);
32        foreach (sort keys(%{$response}) ) {
33                  print "$_ $response->{$_} \n";
34        }
35
36       #$optional_multiple_flag set to a value my $response = whoisip_query(
37       $ip,"true"); foreach ( sort keys %$response ){
38                 print "$_ is\n";
39                 foreach ( @{ $response->{ $_ } } ) {
40                             print "  $_\n";
41                 } }
42
43       #$optonal_array_of_search_options set but not $optional_multiple_flag
44       my $search_options = ["NetName","OrgName"]; my $response =
45       whois_query($ip,"",$search_options); foreach (sort keys(%{$response}) )
46       {
47                  print "$_ $response->{$_} \n"; }
48

DESCRIPTION

50       Perl module to allow whois lookup of ip addresses.  This module should
51       recursively query the various whois providers until it gets the more
52       detailed information including either TechPhone or OrgTechPhone by
53       default; however, this is overrideable.
54

AUTHOR

56       Ben Schmitz -- ben@foink.com
57
58       Thanks to Orbitz for allowing the community access to this work
59
60       Please email me any suggestions, complaints, etc.
61

SEE ALSO

63       perl(1).  Net::Whois
64
65
66
67perl v5.12.1                      2010-09-06                             IP(3)
Impressum