NAME
Geo::IP2Proxy - Reverse search of IP addresses to detect VPN servers, open proxies, web proxies, Tor exit nodes, search engine robots, data center ranges, residential proxies, consumer privacy networks, and enterprise private networks using IP2Proxy BIN databases. Other available information includes proxy type, country, state, city, ISP, domain name, usage type, AS number, AS name, threats, last seen date, and provider names.
This pure Perl module uses a file based IP2Proxy .BIN database available at IP2Proxy Proxy Detection upon subscription. You can visit Libraries to download sample BIN files. IP2Proxy supports both IPv4 and IPv6 addressing.
SYNOPSIS
use Geo::IP2Proxy;
eval {
my $obj = Geo::IP2Proxy->open("IP2PROXY-IP-PROXYTYPE-COUNTRY-REGION-CITY-ISP-DOMAIN-USAGETYPE-ASN-LASTSEEN-THREAT-RESIDENTIAL-PROVIDER.BIN");
if (!defined($obj)) {
print STDERR Geo::IP2Proxy::get_last_error_message();
}
my $packageversion = $obj->getPackageVersion();
my $dbversion = $obj->getDatabaseVersion();
my $moduleversion = $obj->getModuleVersion();
my $countryshort = $obj->getCountryShort("2001:0000:0000:0000:0000:0000:0000:0000");
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 $threat = $obj->getThreat("1.2.3.4");
my $provider = $obj->getProvider("1.2.3.4");
my $proxytype = $obj->getProxyType("1.2.3.4");
my $isproxy = $obj->isProxy("1.2.3.4");
($isproxy, $proxytype, $countryshort, $countrylong, $region, $city, $isp, $domain, $usagetype, $asn, $as, $lastseen, $threat, $provider) = $obj->getAll("1.2.3.4");
($isproxy, $proxytype, $countryshort, $countrylong, $region, $city, $isp, $domain, $usagetype, $asn, $as, $lastseen, $threat, $provider) = $obj->getAll("2001:0000:0000:0000:0000:0000:0000:0000");
$obj->close();
} or do {
print STDERR Geo::IP2Proxy::get_last_error_message();
};
DESCRIPTION
This Perl module provides quick reverse lookup of IP addresses to detect VPN servers, open proxies, web proxies, Tor exit nodes, search engine robots, data center ranges, residential proxies, consumer privacy networks, and enterprise private networks using IP2Proxy BIN databases. Other available information includes proxy type, country, state, city, ISP, domain name, usage type, AS number, AS name, threats, last seen date, and provider names.
This pure Perl module uses a file based IP2Proxy .BIN database available at IP2Proxy Product Page upon subscription. You can visit Libraries to download sample BIN files. IP2Proxy supports both IPv4 and IPv6 addressing.
IP2PROXY DATABASES
The complete IPv4 and IPv6 proxy database are available at IP2Proxy product page
Meanwhile, sample BIN databases are available at IP2Proxy 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 IP2Proxy LITE
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 Virtual Private Networks. TOR Tor Exit Nodes. PUB Public Proxies. WEB Web Proxies. DCH Hosting Providers/Data Center. SES Search Engine Robots. RES Residential Proxies. [PX10+] CPN Consumer Privacy Networks. [PX11+] EPN Enterprise Private Networks. [PX11+]
- $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.
- $threat = $obj->getThreat( $ip );
-
Returns the threat types reported to proxy's IP address or domain name. Returns "-" if no threat reported.
SPAM Spammer SCANNER Security Scanner or Attack BOTNET Spyware or Malware
- $provider = $obj->getProvider( $ip );
-
Returns the VPN service provider name if available. Returns "-" if otherwise.
- ($isproxy, $proxytype, $coshort, $colong, $region, $city, $isp, $domain, $usagetype, $asn, $as, $lastseen, $threat, $provider) = $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, last seen days, threats and provider names 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.
- $error = Geo::IP2Proxy::get_last_error_message();
-
Returns the last error message.
SEE ALSO
VERSION
3.40
AUTHOR
Copyright (c) 2024 IP2Location.com
All rights reserved. This package is free software. It is licensed under the MIT. See the LICENSE file for full license information.