• Your shopping cart is empty!

IP2Proxy PHP Module

This module is a PHP module that enables the user to find the IP addresses which are used as VPN anonymizer, open proxies, web proxies and Tor exits.

Installation
  1. Add the below line into your composer.json file.
    {
      "require": {
    	"ip2location/ip2proxy-php": "1.*"
      }
    }
  2. Run the command:
    composer install

    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 IPv4
IP2Proxy PX1 Sample BIN File Download (5.88 MB)
IP2Proxy PX2 Sample BIN File Download (6.95 MB)
IP2Proxy PX3 Sample BIN File Download (9.30 MB)
IP2Proxy PX4 Sample BIN File Download (13.26 MB)
IP2Proxy PX5 Sample BIN File Download (14.47 MB)
IP2Proxy PX6 Sample BIN File Download (14.59 MB)
IP2Proxy PX7 Sample BIN File Download (16.09 MB)
IP2Proxy PX8 Sample BIN File Download (16.48 MB)