NAME
Geo::IP2Proxy - Reverse search of IP address to detect VPN servers, open proxies, web proxies, Tor exit nodes, search engine robots and data center ranges using IP2Proxy BIN database. Other information available includes proxy type, country, state, city, ISP, domain name, usage type, AS number, AS name and last seen date.
This pure Perl module uses a file based IP2Proxy .BIN database available at https://www.ip2location.com/database/ip2proxy upon subscription. It supports both IPv4 and IPv6 addressing.
SYNOPSIS
use Geo::IP2Proxy;
my $obj = Geo::IP2Proxy->open("IP2PROXY-IP-PROXYTYPE-COUNTRY-REGION-CITY-ISP-DOMAIN-USAGETYPE-ASN-LASTSEEN.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 $isp = $obj->getISP("1.2.3.4");
my $domain = $obj->getDomain("1.2.3.4");
my $usagetype = $obj->getUsageType("1.2.3.4");
my $asn = $obj->getASN("1.2.3.4");
my $as = $obj->getAS("1.2.3.4");
my $lastseen = $obj->getLastSeen("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, $domain, $usagetype, $asn, $as, $lastseen) = $obj->getAll("1.2.3.4");
($isproxy, $proxytype, $coshort, $colong, $region, $city, $isp, $domain, $usagetype, $asn, $as, $lastseen) = $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, search engine robots and data center ranges using IP2Proxy BIN database. Other information available includes proxy type, country, state, city, ISP, domain name, usage type, AS number, AS name and last seen date.
This pure Perl module uses a file based IP2Proxy .BIN database available at https://www.ip2location.com/database/ip2proxy upon subscription. You can visit https://www.ip2location.com/development-libraries to download BIN sample files. It supports both IPv4 and IPv6 addressing.
IP2PROXY DATABASES
The complete IPv4 and IPv6 proxy database are available at
https://www.ip2location.com/database/ip2proxy
Meanwhile, sample databases are available at
https://www.ip2location.com/development-libraries
The IP2Proxy database is being 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.
- $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. SES Search Engine Robots.
- $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.
- $isp = $obj->getISP( $ip );
-
Returns the ISP name of proxy's IP address or domain name. Returns "-" if not a proxy.
- $domain = $obj->getDomain( $ip );
-
Returns the domain name of proxy's IP address or domain name. Returns "-" if not a proxy.
- $usagetype = $obj->getUsageType( $ip );
-
Returns the ISP's usage type of proxy's IP address or domain name. Returns "-" if not a proxy.
COM Commercial ORG Organization GOV Government MIL Military EDU University/College/School LIB Library CDN Content Delivery Network ISP Fixed Line ISP MOB Mobile ISP DCH Data Center/Web Hosting/Transit SES Search Engine Spider RSV Reserved
- $asn = $obj->getASN( $ip );
-
Returns the autonomous system number (ASN) of proxy's IP address or domain name. Returns "-" if not a proxy.
- $as = $obj->getAS( $ip );
-
Returns the autonomous system (AS) name of proxy's IP address or domain name. Returns "-" if not a proxy.
- $lastseen = $obj->getLastSeen( $ip );
-
Returns the last seen days ago value of proxy's IP address or domain name. Returns "-" if not a proxy.
- ($isproxy, $proxytype, $coshort, $colong, $region, $city, $isp, $domain, $usagetype, $asn, $as, $lastseen) = $obj->getAll( $ip );
-
Returns an array of proxy status, proxy type, country short and long name, region, city, ISP, domain name, usage type, AS number, AS name and last seen days 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/database/ip2proxy
VERSION
2.00
AUTHOR
Copyright (c) 2019 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 1113:
You forgot a '=back' before '=head1'