|
Geo::IP2Location - Fast lookup of country, region, city, latitude, longitude, ZIP code, ISP and domain name from IP address by using IP2Location database. Supports IPv4 and IPv6. |
Geo::IP2Location - Fast lookup of country, region, city, latitude, longitude, ZIP code, ISP and domain name from IP address by using IP2Location database. Supports IPv4 and IPv6.
use Geo::IP2Location;
my $obj = Geo::IP2Location->open("IP-COUNTRY-REGION-CITY-LATITUDE-LONGITUDE-ZIPCODE-ISP-DOMAIN.BIN");
my $dbversion = $obj->get_database_version();
my $moduleversion = $obj->get_module_version();
my $countryshort = $obj->get_country_short("20.11.187.239");
my $countrylong = $obj->get_country_long("20.11.187.239");
my $region = $obj->get_region("20.11.187.239");
my $city = $obj->get_city("20.11.187.239");
my $latitude = $obj->get_latitude("20.11.187.239");
my $longitude = $obj->get_longitude("20.11.187.239");
my $isp = $obj->get_isp("20.11.187.239");
my $domain = $obj->get_domain("20.11.187.239");
my $zipcode = $obj->get_zipcode("20.11.187.239");
($cos, $col, $reg, $cit, $lat, $lon, $zip, $isp, $dom) = $obj->get_all("20.11.187.239");
($cos, $col, $reg, $cit, $lat, $lon, $zip, $isp, $dom) = $obj->get_all("2001:1000:0000:0000:0000:0000:0000:0000");
This Perl modules provide fast lookup of country, region, city, latitude, longitude, ISP and domain name from IP address by using IP2Location database. This module uses a file based database available at IP2Location.com. This database simply contains IP blocks as keys, and other information such as country, region, city, latitude, longitude, ISP and domain name as values. It supports both IP address in IPv4 and IPv6.
This module can be used in many types of projects such as:
1) select the geographically closest mirror 2) analyze your web server logs to determine the countries of your visitors 3) credit card fraud detection 4) software export controls 5) display native language and currency 6) prevent password sharing and abuse of service 7) geotargeting in advertisement
The complete IPv4 and IPv6 database are available at
The database will be updated in monthly basis for greater accuracy. Free sample database is available at
http://www.ip2location.com/developers.htm
2.00
Copyright (c) 2006 IP2Location.com
All rights reserved. This package is free software; It is licensed under the GPL.
|
Geo::IP2Location - Fast lookup of country, region, city, latitude, longitude, ZIP code, ISP and domain name from IP address by using IP2Location database. Supports IPv4 and IPv6. |