Mail::SpamCannibal::WhoisIP - IP address whois service


Mail-SpamCannibal documentation  | view source Contained in the Mail-SpamCannibal distribution.

Index


NAME

Top

Mail::SpamCannibal::WhoisIP - IP address whois service

SYNOPSIS

Top

  use Mail::SpamCannibal::WhoisIP qw(
	whoisip_query
	whoisIP
  );

  $response = whoisip_query($ip);
  $response = whoisip_query( $ip,"true");
  $response = whoisIP($ip);
  @response = whoisIP($ip);

DESCRIPTION

Top

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

Top

	Net::Whois::IP 0.35

EXPORT_OK

Top

	whoisip_query
	whoisIP

COPYRIGHT

Top

AUTHOR

Top

Michael Robinton <michael@bizsystems.com>


Mail-SpamCannibal documentation  | view source Contained in the Mail-SpamCannibal distribution.