PHPackages                             ip2location/ip2proxy-cakephp - 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. [Security](/categories/security)
4. /
5. ip2location/ip2proxy-cakephp

ActiveLibrary[Security](/categories/security)

ip2location/ip2proxy-cakephp
============================

Allow users to query an IP address if it was being used as open proxy, web proxy, VPN anonymizer and TOR exit nodes, search engine robots, data center ranges and residential proxies.

1.1.3(1y ago)41311MITPHPPHP &gt;=5.4.0CI failing

Since Sep 14Pushed 2w ago2 watchersCompare

[ Source](https://github.com/ip2location-com/ip2proxy-cakephp)[ Packagist](https://packagist.org/packages/ip2location/ip2proxy-cakephp)[ Docs](https://github.com/ip2location/ip2proxy-cakephp)[ RSS](/packages/ip2location-ip2proxy-cakephp/feed)WikiDiscussions master Synced today

READMEChangelog (5)Dependencies (3)Versions (6)Used By (0)

IP2Proxy CakePHP Plugin
=======================

[](#ip2proxy-cakephp-plugin)

[![Latest Stable Version](https://camo.githubusercontent.com/e53cb7b2d7fc8665f2a1cc5a83c26f89833bc0847e0b856768a454393dc862d5/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6970326c6f636174696f6e2f69703270726f78792d63616b657068702e737667)](https://packagist.org/packages/ip2location/ip2proxy-cakephp)[![Total Downloads](https://camo.githubusercontent.com/1384c21f411323999b5bdbb9d445f055259423c61d29fb664be99618e2e26a9a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6970326c6f636174696f6e2f69703270726f78792d63616b657068702e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/ip2location/ip2proxy-cakephp)

IP2Proxy CakePHP plugin enables the user to query an IP address if it was being used as open proxy, web proxy, VPN anonymizer and TOR exit nodes, search engine robots, data center ranges, residential proxies, consumer privacy networks and enterprise private networks. It lookup the proxy IP address from IP2Proxy BIN Data file or web service. Developers can use the API to query all IP2Proxy BIN databases or web service for applications written using CakePHP.

Note: This plugin works in CakePHP 4 and CakePHP 5.

INSTALLATION
------------

[](#installation)

1. Run the command: `composer require ip2location/ip2proxy-cakephp` to download the plugin into the CakePHP platform.
2. Download latest IP2Proxy BIN database
    - IP2Proxy free LITE database at
    - IP2Proxy commercial database at
3. Unzip and copy the BIN file into *cakephp/vendor/ip2location/ip2proxy-cakephp/src/Data* folder.
4. Rename the BIN file to IP2PROXY.BIN.

**Note:** The plugin has included an old BIN database for your testing and development purpose. You may want to download a latest copy of BIN database as the URL stated above. The BIN database refers to the binary file ended with .BIN extension, but not the CSV format. Please select the right package for download.

USAGE
-----

[](#usage)

In this tutorial, we will show you on how to create a **TestsController** to display the IP information.

1. Create a **TestsController** in CakePHP using the below command line

```
php bin/cake bake controller Tests

```

2. Create an empty **index.php** file in *cakephp/templates/Tests* folder.
3. Open the **cakephp/src/Controller/TestsController.php** in any text editor.
4. Remove the contents in TestsController.php and add the below lines into the controller file.

```
