Geo::IP::PurePerl is a Perl module to lookup country by IP Address.
SYNOPSIS
use Geo::IP::PurePerl;
my $gi = Geo::IP::PurePerl->new(GEOIP_STANDARD);
# look up IP address '24.24.24.24'
my $country = $gi->country_code_by_addr('24.24.24.24');
$country = $gi->country_code_by_name('yahoo.com');
# $country is equal to "US"
This module uses a file based database. This database simply contains IP blocks as keys, and countries as values. This database is more complete and accurate than reverse DNS lookups.
This module can be used to automatically select the geographically closest mirror, to analyze your web server logs to determine the countries of your visiters, for credit card fraud detection, and for software export controls.
Product's homepage
Requirements:
· Perl