NAME

Business::MaxMind::LocationVerification - Access free and paid MaxMind Location Verification services

ABSTRACT

this Module quieries the Location verification service and returns the estimated distance between the entered city, region and country and the location of the IP address

SYNOPSIS

This example queries the Location Verification service and displays the results:

my $ccfs = Business::MaxMind::LocationVerification->new(isSecure => 1, debug => 0, timeout => 10);
$locv->input(
  i => '24.24.24.24',
  city => 'NewYork',
  region => 'NY',
  postal => '10011',
  country => 'US')

METHODS

new

Class method that returns a Business::MaxMind::LocationVerification object. If isSecure is set to 1, it will use a secure connection. If debug is set to 1, will print debugging output to standard error. timeout parameter is used to set timeout in seconds, if absent default value for timeout is 10 seconds.

input

Sets input fields. The input fields are

  • i: Client IP Address (IP address of your client)
  • city, region, postal, country: Entered City/State/ZipCode/Country

Returns 1 on success, 0 on failure.

query

Sends out query to MaxMind server and waits for response. If the primary server fails to respond, it sends out a request to the secondary server.

output

Returns the output returned by the MaxMind server as a hash reference.

SEE ALSO

http://www.maxmind.com/app/locv

AUTHOR

TJ Mather, <tjmather@maxmind.com>

COPYRIGHT AND LICENSE

Copyright 2008 by MaxMind LLC

All rights reserved. This package is free software and is licensed under the GPL. For details, see the COPYING file.