NAME
Geo::IP2Proxy - Reverse lookup IP address to detect VPN servers, open proxies, web proxies, Tor exit nodes and data center ranges using IP2Proxy BIN database. It supports both IPv4 and IPv6 addressing. Please visit https://www.ip2location.com/proxy-database for more information.
SYNOPSIS
use Geo::IP2Proxy;
my $obj = Geo::IP2Proxy->open("IP2PROXY-IP-PROXYTYPE-COUNTRY-REGION-CITY-ISP.BIN");
my $packageversion = $obj->getPackageVersion();
my $dbversion = $obj->getDatabaseVersion();
my $moduleversion = $obj->getModuleVersion();
my $countryshort = $obj->getCountryShort("1.2.3.4");
my $countrylong = $obj->getCountryLong("1.2.3.4");
my $region = $obj->getRegion("1.2.3.4");
my $city = $obj->getCity("1.2.3.4");
my $proxytype = $obj->getProxyType("1.2.3.4");
my $isproxy = $obj->isProxy("1.2.3.4");
($isproxy, $proxytype, $coshort, $colong, $region, $city, $isp) = $obj->getAll("1.2.3.4");
($isproxy, $proxytype, $coshort, $colong, $region, $city, $isp) = $obj->getAll("2001:0000:0000:0000:0000:0000:0000:0000");
$obj->close();
DESCRIPTION
This Perl module provides fast reverse lookup of IP address to detect VPN servers, open proxies, web proxies, Tor exit nodes and data center ranges using IP2Proxy BIN database. This module uses a file based IP2Proxy .BIN database available at https://www.ip2location.com/proxy-database upon subscription. It supports both IPv4 and IPv6 addressing.
IP2PROXY DATABASES
The complete IPv4 and IPv6 proxy database are available at:
https://www.ip2location.com/proxy-database
The database will be updated in daily basis for greater accuracy.
Free creative-common monthly database with open proxies data only is available at https://lite.ip2location.com
CLASS METHODS
- $obj = Geo::IP2Proxy->open($database_file);
-
Constructs a new Geo::IP2Proxy object with the database located at $database_file.
OBJECT METHODS
- $isproxy = $obj->isProxy( $ip );
-
Returns 0 if IP address is not a proxy. Returns 1 if it is proxy excluding data center range. Returns 2 if is is data center range. Returns -1 if error.
- $countryshort = $obj->getCountryShort( $ip );
-
Returns the ISO 3166 country code of proxy's IP address or domain name. Returns "-" if not a proxy.
- $countrylong = $obj->getCountryLong( $ip );
-
Returns the full country name of proxy's IP address or domain name. Returns "-" if not a proxy.
- $region = $obj->getRegion( $ip );
-
Returns the region of proxy's IP address or domain name. Returns "-" if not a proxy.
- $city = $obj->getCity( $ip );
-
Returns the city of IP address or domain name. Returns "-" if not a proxy.
- $latitude = $obj->getISP( $ip );
-
Returns the ISP name of proxy's IP address or domain name. Returns "-" if not a proxy.
- $proxytype = $obj->getProxyType( $ip );
-
Returns the proxy type of proxy's IP address or domain name. Returns "-" if not a proxy.
VPN Anonymizing VPN services. TOR Tor Exit Nodes. PUB Public Proxies. WEB Web Proxies. DCH Hosting Providers/Data Center.
- ($isproxy, $proxytype, $coshort, $colong, $region, $city, $isp) = $obj->getAll( $ip );
-
Returns an array of proxy status, proxy type, country short and long name, region, city and ISP of proxy's IP address or domain name. Returns "-" in most field if not a proxy.
- $packageversion = $obj->getPackageVersion();
-
Returns the package number of IP2Proxy database.
- $dbversion = $obj->getDatabaseVersion();
-
Returns the version number of IP2Proxy database.
- $moduleversion = $obj->getModuleVersion();
-
Returns the version number of Geo::IP2Proxy Perl module.
SEE ALSO
https://www.ip2location.com/proxy-database
VERSION
1.00
AUTHOR
Copyright (c) 2017 IP2Location.com
All rights reserved. This package is free software; It is licensed under the GPL.
1 POD Error
The following errors were encountered while parsing the POD:
- Around line 873:
You forgot a '=back' before '=head1'