++ed by:
PLU PERLOVER BINJOY OALDERS SZABGAB

7 PAUSE user(s)
1 non-PAUSE user(s).

T.J. Mather

NAME

Geo::IP - Look up country by IP Address

SYNOPSIS

  use Geo::IP;

  my $gi = new Geo::IP('/path/to/db/Net-Geography-Perl_200106.db');

  # look up IP address '65.15.30.247'
  # returns undef if country is unallocated, or not defined in our database
  my $country = $gi->lookup_country('65.15.30.247');
  # $country is equal to "US"

DESCRIPTION

This module uses the Berkeley database. This database simply contains IP blocks as keys, and countries as values. The data is obtained from the ARIN, RIPE, and APNIC whois servers. This database should be more complete and accurate than reverse DNS lookups.

This module can be used to automatically select the geographically closest mirror, or to target advertising by country, to analyze your web server logs to determine the countries of your visiters, for credit card fraud detection, and for software export controls.

To find a country for an IP address, this module finds Networks that contain the IP address, starting with a netmask of 32, going up to 3 until it finds a matching IP Block.

VERSION

0.02

IP to country database available from http://www.geo-ip.com Up-to-date as of June 1st, 2001

Updates to the database should come out monthly. Look for updates at http://www.geo-ip.com

AUTHOR

Copyright (c) 2001, T.J. Mather, tjmather@tjmather.com

All rights reserved. This package is free software; you can redistribute it and/or modify it under the same terms as Perl itself.