PHPackages                             ip2location/codeigniter-ip2proxy - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. ip2location/codeigniter-ip2proxy

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

ip2location/codeigniter-ip2proxy
================================

IP2Proxy library for CodeIgniter. This module allows user to reverse search of IP address to detect VPN servers, open proxies, web proxies, Tor exit nodes, search engine robots, data center ranges and residential proxies using IP2Proxy BIN database. Other information available includes proxy type, country, state, city, ISP, domain name, usage type, AS number, AS name, threats, last seen date and provider names.

1.1.0(4y ago)361MITPHP

Since Sep 14Pushed 4mo ago1 watchersCompare

[ Source](https://github.com/ip2location/codeigniter-ip2proxy)[ Packagist](https://packagist.org/packages/ip2location/codeigniter-ip2proxy)[ Docs](https://www.ip2location.com)[ RSS](/packages/ip2location-codeigniter-ip2proxy/feed)WikiDiscussions master Synced 6d ago

READMEChangelog (2)Dependencies (1)Versions (3)Used By (0)

CodeIgniter IP2Proxy Library
============================

[](#codeigniter-ip2proxy-library)

This module allows user to reverse search of IP address 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. Other information available includes proxy type, country, state, city, ISP, domain name, usage type, AS number, AS name, threats, last seen date and provider names.

Installation
------------

[](#installation)

Upload `controllers` and `libraries` to CodeIgniter `application` folder.

Usage
-----

[](#usage)

This module is able to query the IP address information from either BIN database or web service. This section will explain how to use this extension to query from BIN database and web service.

Sample codes are given in this project, under **controllers** folder. You may run the sample code by using &lt;your\_domain&gt;/index.php/ip2proxy\_test.

### BIN Database

[](#bin-database)

Use following codes in your application for get geolocation information.

```
// (optional) Define IP2Proxy database path.
define('IP2PROXY_DATABASE', '/path/to/ip2proxy/database');

$ipx = new IP2Proxy_lib();
$countryCode = $ipx->getCountryShort('1.0.241.135');

```

Below are the methods supported for BIN data file lookup.

```
$countryShort = $ipx->getCountryShort($ip);
$countryLong = $ipx->getCountryLong($ip);
$region = $ipx->getRegion($ip);
$city = $ipx->getCity($ip);
$isp = $ipx->getISP($ip);
$doamin = $ipx->getDomain($ip);
$usageType = $ipx->getUsageType($ip);
$proxyType = $ipx->getProxyType($ip);
$asn = $ipx->getASN($ip);
$as = $ipx->getAS($ip);
$lastSeen = $ipx->getLastSeen($ip);
$threat = $ipx->getThreat($ip);
$provider = $ipx->getProvider($ip);
$isProxy = $ipx->isProxy($ip);

```

### Web Service

[](#web-service)

Use following codes in your application for get geolocation information.

```
// (required) Define IP2Proxy API key.
define('IP2PROXY_API_KEY', 'your_api_key');

// (required) Define IP2Proxy Web service package of different granularity of return information.
define('IP2PROXY_PACKAGE', 'PX1');

// (optional) Define to use https or http.
define('IP2PROXY_USESSL', false);

$ipx = new IP2Proxy_lib();
print_r ($ipx->getWebService('1.0.241.135'));

```

Dependencies
------------

[](#dependencies)

This module requires IP2Proxy BIN data file or IP2Proxy API key to function. You may download the BIN data file at

- IP2Proxy LITE BIN Data (Free):
- IP2Proxy Commercial BIN Data (Comprehensive):

You can also sign up for [IP2Proxy Web Service](https://www.ip2location.com/web-service/ip2proxy) to get one free API key.

IPv4 BIN vs IPv6 BIN
--------------------

[](#ipv4-bin-vs-ipv6-bin)

- Use the IPv4 BIN file if you just need to query IPv4 addresses.
- Use the IPv6 BIN file if you need to query BOTH IPv4 and IPv6 addresses.

SUPPORT
-------

[](#support)

Email:

Website:

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance51

Moderate activity, may be stable

Popularity9

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~352 days

Total

2

Last Release

1718d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/d5fbe791b4a8d666a158043146d73380f05a0bea9062f0fa0852bf82f6bc762c?d=identicon)[ip2location](/maintainers/ip2location)

---

Top Contributors

[![ip2location-com](https://avatars.githubusercontent.com/u/6367210?v=4)](https://github.com/ip2location-com "ip2location-com (6 commits)")

---

Tags

codeigniter-ip2proxyip-lookupip2proxy-bin-databaseproxy-informationproxy-lookupweb-serviceproxyweb servicegeolocationip geolocationip-lookupip-databasegeolocation-informationip-address-databaseip2proxy-bin-databasecodeigniter-ip2proxy

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/ip2location-codeigniter-ip2proxy/health.svg)

```
[![Health](https://phpackages.com/badges/ip2location-codeigniter-ip2proxy/health.svg)](https://phpackages.com/packages/ip2location-codeigniter-ip2proxy)
```

###  Alternatives

[fideloper/proxy

Set trusted proxies for Laravel

7.3k174.4M559](/packages/fideloper-proxy)[ocramius/proxy-manager

A library providing utilities to generate, instantiate and generally operate with Object Proxies

5.0k82.4M230](/packages/ocramius-proxy-manager)[symfony/var-exporter

Provides tools to export, instantiate, hydrate, clone and lazy-load PHP objects

2.1k378.1M441](/packages/symfony-var-exporter)[friendsofphp/proxy-manager-lts

Adding support for a wider range of PHP versions to ocramius/proxy-manager

1.2k139.1M104](/packages/friendsofphp-proxy-manager-lts)[torann/geoip

Support for multiple Geographical Location services.

2.2k14.2M76](/packages/torann-geoip)[ip2location/ip2location-php

\[Official Release\] IP2Location PHP API to get location info from IPv4 and IPv6 address.

2133.9M33](/packages/ip2location-ip2location-php)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
