ip2location facebbook  ip2location twitter  ip2location google+ ip2location github

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.

Download Download   Source Source


ZIP Installation
  1. Download and unzip and package from
Composer Installation
  1. Add the below line into your composer.json file.
      "require": {
        "ip2location/ip2proxy-php": "1.*"
  2. Run the command: composer install
  3. Done.

Note: You just need to include the below code in order to use the library.

require 'vendor/autoload.php';


Sample Codes
require 'class.IP2Proxy.php';

$db = new \IP2Proxy\Database();

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

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

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

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

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

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

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

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

echo '<pre>';
echo '</pre>';



IP2Proxy LITE BIN Database

Developers may subscribe the free IP2Proxy LITE BIN database for testing and evaluation purpose. Please take note that the LITE database is limited to public proxies (PUB) IP address. Commercial databases consist of other proxy types such as Tor, VPN and etcs.