{"id":21945886,"url":"https://github.com/ip2location/ip2proxy-cakephp","last_synced_at":"2025-08-24T13:18:07.406Z","repository":{"id":56993055,"uuid":"103482048","full_name":"ip2location/ip2proxy-cakephp","owner":"ip2location","description":"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 exits.","archived":false,"fork":false,"pushed_at":"2024-10-04T04:59:12.000Z","size":23,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-08-23T10:59:45.249Z","etag":null,"topics":["cakephp","cakephp-plugin","ip2proxy","ip2proxy-bin-databases","ip2proxy-cakephp","proxy-checker","proxy-database","tor-exits","vpn-anonymizer","web-proxy"],"latest_commit_sha":null,"homepage":"https://www.ip2location.com","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ip2location.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.TXT","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2017-09-14T03:35:47.000Z","updated_at":"2025-05-09T19:03:50.000Z","dependencies_parsed_at":"2024-01-03T02:05:03.469Z","dependency_job_id":"786f33ec-5e9d-43c6-b6d6-58e04aed5ab6","html_url":"https://github.com/ip2location/ip2proxy-cakephp","commit_stats":{"total_commits":10,"total_committers":1,"mean_commits":10.0,"dds":0.0,"last_synced_commit":"c842b118b92f3fc5f038d245a53d90efaa82f3e4"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/ip2location/ip2proxy-cakephp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ip2location%2Fip2proxy-cakephp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ip2location%2Fip2proxy-cakephp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ip2location%2Fip2proxy-cakephp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ip2location%2Fip2proxy-cakephp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ip2location","download_url":"https://codeload.github.com/ip2location/ip2proxy-cakephp/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ip2location%2Fip2proxy-cakephp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271873237,"owners_count":24837246,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-24T02:00:11.135Z","response_time":111,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cakephp","cakephp-plugin","ip2proxy","ip2proxy-bin-databases","ip2proxy-cakephp","proxy-checker","proxy-database","tor-exits","vpn-anonymizer","web-proxy"],"created_at":"2024-11-29T04:19:59.496Z","updated_at":"2025-08-24T13:18:07.326Z","avatar_url":"https://github.com/ip2location.png","language":"PHP","readme":"# IP2Proxy CakePHP Plugin\n[![Latest Stable Version](https://img.shields.io/packagist/v/ip2location/ip2proxy-cakephp.svg)](https://packagist.org/packages/ip2location/ip2proxy-cakephp)\n[![Total Downloads](https://img.shields.io/packagist/dt/ip2location/ip2proxy-cakephp.svg?style=flat-square)](https://packagist.org/packages/ip2location/ip2proxy-cakephp)\n\nIP2Proxy 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.\n\nNote: This plugin works in CakePHP 4 and CakePHP 5.\n\n\n## INSTALLATION\n1. Run the command: `composer require ip2location/ip2proxy-cakephp` to download the plugin into the CakePHP platform.\n2. Download latest IP2Proxy BIN database\n    - IP2Proxy free LITE database at https://lite.ip2location.com\n    - IP2Proxy commercial database at https://www.ip2location.com/proxy-database\n3. Unzip and copy the BIN file into *cakephp/vendor/ip2location/ip2proxy-cakephp/src/Data* folder. \n4. Rename the BIN file to IP2PROXY.BIN.\n\n**Note:** The plugin has included an old BIN database for your testing and development purpose. \nYou may want to download a latest copy of BIN database as the URL stated above.\nThe BIN database refers to the binary file ended with .BIN extension, but not the CSV format.\nPlease select the right package for download.\n\n\n## USAGE\nIn this tutorial, we will show you on how to create a **TestsController** to display the IP information.\n\n1. Create a **TestsController** in CakePHP using the below command line\n```\nphp bin/cake bake controller Tests\n```\n2. Create an empty **index.php** file in *cakephp/templates/Tests* folder.\n3. Open the **cakephp/src/Controller/TestsController.php** in any text editor.\n4. Remove the contents in TestsController.php and add the below lines into the controller file.\n```\n\u003c?php\nnamespace App\\Controller;\n\nuse App\\Controller\\AppController;\nuse IP2ProxyCakePHP\\Controller\\IP2ProxyCoresController;\n\n// (required) Define IP2Location.io API key.\ndefine('IP2LOCATION_IO_API_KEY', 'your_api_key');\n\n// (optional) Define Translation information. Refer to https://www.ip2location.io/ip2location-documentation for available languages.\ndefine('IP2LOCATION_IO_LANGUAGE', 'en');\n\n/**\n * Tests Controller\n */\nclass TestsController extends AppController\n{\n\n    /**\n     * Index method\n     *\n     * @return \\Cake\\Http\\Response|void\n     */\n    public function index()\n    {\n        $IP2Proxy = new IP2ProxyCoresController();\n\n        $record = $IP2Proxy-\u003eget('1.0.241.135');\n        echo 'Result from BIN Database:\u003cbr\u003e';\n        echo '\u003cp\u003e\u003cstrong\u003eIP Address: \u003c/strong\u003e' . $record['ipAddress'] . '\u003c/p\u003e';\n        echo '\u003cp\u003e\u003cstrong\u003eIP Number: \u003c/strong\u003e' . $record['ipNumber'] . '\u003c/p\u003e';\n        echo '\u003cp\u003e\u003cstrong\u003eIP Version: \u003c/strong\u003e' . $record['ipVersion'] . '\u003c/p\u003e';\n        echo '\u003cp\u003e\u003cstrong\u003eCountry Code: \u003c/strong\u003e' . $record['countryCode'] . '\u003c/p\u003e';\n        echo '\u003cp\u003e\u003cstrong\u003eCountry: \u003c/strong\u003e' . $record['countryName'] . '\u003c/p\u003e';\n        echo '\u003cp\u003e\u003cstrong\u003eState: \u003c/strong\u003e' . $record['regionName'] . '\u003c/p\u003e';\n        echo '\u003cp\u003e\u003cstrong\u003eCity: \u003c/strong\u003e' . $record['cityName'] . '\u003c/p\u003e';\n        echo '\u003cp\u003e\u003cstrong\u003eProxy Type: \u003c/strong\u003e' . $record['proxyType'] . '\u003c/p\u003e';\n        echo '\u003cp\u003e\u003cstrong\u003eIs Proxy: \u003c/strong\u003e' . $record['isProxy'] . '\u003c/p\u003e';\n        echo '\u003cp\u003e\u003cstrong\u003eISP: \u003c/strong\u003e' . $record['isp'] . '\u003c/p\u003e';\n        echo '\u003cp\u003e\u003cstrong\u003eDomain: \u003c/strong\u003e' . $record['domain'] . '\u003c/p\u003e';\n        echo '\u003cp\u003e\u003cstrong\u003eUsage Type: \u003c/strong\u003e' . $record['usageType'] . '\u003c/p\u003e';\n        echo '\u003cp\u003e\u003cstrong\u003eASN: \u003c/strong\u003e' . $record['asn'] . '\u003c/p\u003e';\n        echo '\u003cp\u003e\u003cstrong\u003eAS: \u003c/strong\u003e' . $record['as'] . '\u003c/p\u003e';\n        echo '\u003cp\u003e\u003cstrong\u003eLast Seen: \u003c/strong\u003e' . $record['lastSeen'] . '\u003c/p\u003e';\n        echo '\u003cp\u003e\u003cstrong\u003eThreat: \u003c/strong\u003e' . $record['threat'] . '\u003c/p\u003e';\n        echo '\u003cp\u003e\u003cstrong\u003eProvider: \u003c/strong\u003e' . $record['provider'] . '\u003c/p\u003e';\n\n        $record = $IP2Proxy-\u003egetWebService('1.0.241.135');\n        echo 'Result from Web service:\u003cbr\u003e';\n        echo '\u003cpre\u003e';\n        print_r ($record);\n        echo '\u003c/pre\u003e';\n    }\n\n}\n```\n5. Enter the URL \u003cyour domain\u003e/Tests and run. You should see the information of **1.0.241.135** IP address.\n\n\n## DEPENDENCIES\nThis library requires IP2Proxy BIN or IP2Proxy API key data file to function. You may download the BIN data file at\n* IP2Proxy LITE BIN Data (Free): https://lite.ip2location.com\n* IP2Proxy Commercial BIN Data (Comprehensive): https://www.ip2location.com/proxy-database\n\nYou can also sign up for [IP2Location.io IP Geolocation API](https://www.ip2location.io/sign-up) to get one free API key.\n\n\n## SUPPORT\nEmail: support@ip2location.com\n\nWebsite: https://www.ip2location.com\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fip2location%2Fip2proxy-cakephp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fip2location%2Fip2proxy-cakephp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fip2location%2Fip2proxy-cakephp/lists"}