NAME
Mail::SpamCannibal::WhoisIP - IP address whois service
SYNOPSIS
use Mail::SpamCannibal::WhoisIP qw(
whoisip_query
whoisIP
);
$response = whoisip_query($ip);
$response = whoisip_query( $ip,"true");
$response = whoisIP($ip);
@response = whoisIP($ip);
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.
$response = whoisip_query($ip,$flag);
This function is exported directly from Net::Whois::IP. This description is from version 0.35 of that module.
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"; } }
$response=whiosIP($ip); or @response=whoisIP($ip);
This function returns a text string or array of text lines which is the response (or last response if there were multiple records) from the authoratitive server for the IP address of interest.
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
DEPENDENCIES
Net::Whois::IP 0.35
EXPORT_OK
whoisip_query
whoisIP
COPYRIGHT
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.
AUTHOR
Michael Robinton <michael@bizsystems.com>