Mail::SpamCannibal::WhoisIP - IP address whois service
use Mail::SpamCannibal::WhoisIP qw(
whoisip_query
whoisIP
);
$response = whoisip_query($ip); $response = whoisip_query( $ip,"true"); $response = whoisIP($ip); @response = whoisIP($ip);
=head1 DESCRIPTION
Mail::SpamCannibal::WhoisIP provides utilities to look up an IP address and return the ownership information as a text string. In addition it provides form and script generation service for web pages.
if $optional_flag is not null, all possible responses for a given record will be returned for example, normally only the last instance of Tech phone will be give if record contains more than one, however, setting this flag to a not null will return both is an array. The other consequence, is that all records returned become references to an array and must be dereferenced to utilize.
Normal unwrap of $response ($optional_flag not set)
my $response = whoisip_query($ip);
foreach (sort keys(%{$response}) ) {
print "$_ $response->{$_} \n";
}
$optional_flag set to a value
my $response = whoisip_query( $ip,"true");
foreach ( sort keys %$response ){
print "$_ is\n";
foreach ( @{$response->{$_}}) {
print " $_\n";
}
}
Returns an array containing a null or a null text string on error or if called with no $IP or an invalid $IP.
input: dotquad IP address
returns: text string or
text array dependent
on calling context
Net::Whois::IP 0.35
=head1 EXPORT_OK
whoisip_query
whoisIP
Copyright 2003, Michael Robinton <michael@bizsystems.com>
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Michael Robinton <michael@bizsystems.com>