IP2Proxy PHP Module

This PHP module supports all IP2Proxy™ BIN database products to query an IP address if it is being used as virtual private networks (VPN), open proxies, web proxies, Tor exits, data center & web hosting ranges (DCH), search engine robots (SES), residential proxies (RES), consumer privacy networks (CPN), and enterprise private networks (EPN). It has been optimized for speed and memory utilization.

Installation
  1. Run the command:
    composer require ip2location/ip2proxy-php

    Note: You just need to include the below code in order to use the library.
    require 'vendor/autoload.php';
Sample Codes
<?php
require 'class.IP2Proxy.php';

$db = new \IP2Proxy\Database();
$db->open('./samples/IP2PROXY-IP-PROXYTYPE-COUNTRY-REGION-CITY-ISP.SAMPLE.BIN', \IP2Proxy\Database::FILE_IO);

$countryCode = $db->getCountryShort('1.0.241.135');
echo '<p><strong>Country Code: </strong>' . $countryCode . '</p>';

$countryName = $db->getCountryLong('1.0.241.135');
echo '<p><strong>Country: </strong>' . $countryName . '</p>';

$regionName = $db->getRegion('1.0.241.135');
echo '<p><strong>Region: </strong>' . $regionName . '</p>';

$cityName = $db->getCity('1.0.241.135');
echo '<p><strong>City: </strong>' . $cityName . '</p>';

$isp = $db->getISP('1.0.241.135');
echo '<p><strong>ISP: </strong>' . $isp . '</p>';

$proxyType = $db->getProxyType('1.0.241.135');
echo '<p><strong>Proxy Type: </strong>' . $proxyType . '</p>';

$isProxy = $db->isProxy('1.0.241.135');
echo '<p><strong>Is Proxy: </strong>' . $isProxy . '</p>';

$records = $db->getAll('1.0.241.135');

echo '<pre>';
print_r($records);
echo '</pre>';

$db->close();
Sample IP2Proxy Databases (BIN)
Sample Packages - BIN File IPv4 + IPv6
IP2Proxy PX1 Download (20.69 MB)
IP2Proxy PX2 Download (23.17 MB)
IP2Proxy PX3 Download (27.55 MB)
IP2Proxy PX4 Download (32.29 MB)
IP2Proxy PX5 Download (33.72 MB)
IP2Proxy PX6 Download (34.01 MB)
IP2Proxy PX7 Download (36.69 MB)
IP2Proxy PX8 Download (37.84 MB)
IP2Proxy PX9 Download (37.69 MB)
IP2Proxy PX10 Download (45.43 MB)
IP2Proxy PX11 Download (46.34 MB)
Pop Up Box

Discover Your User Locations

Retrieve geolocation data for FREE now!