netstyler/cakephp-geoip
Composer 安装命令:
composer require netstyler/cakephp-geoip
包简介
GeoIP Plugin
README 文档
README
CakePHP GeoIP Plugin A CakePHP Plugin for finding a location based on an IP Address using the MaxMind GeoIP database and the PEAR Net_GeoIP package. See also -------- http://www.maxmind.com/app/ip-location http://pear.php.net/package/Net_GeoIP/ http://pear.php.net/manual/en/package.networking.net-geoip.lookuplocation.php Installation ------------ 1. Copy the plugin to app/Plugin/GeoIp 2. Download the MaxMind GeoLite City Database at http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz 3. Uncompress the database to app/Plugin/GeoIp/data/GeoIP.dat Usage ----- Just load the behavior ```php class MyModel extends AppModel { public $actsAs = array('GeoIp.GeoIp); } ``` You can then call: ```php $location = $this->MyModel->ipLookup(CakeRequest::clientIp(false)); ``` Contributing to this Plugin --------------------------- Please feel free to contribute to the plugin with new issues, requests, unit tests and code fixes or new features. If you want to contribute some code, create a feature branch from develop, and send us your pull request. Unit tests for new features and issues detected are mandatory to keep quality high. License ------- Licensed under [The MIT License](http://www.opensource.org/licenses/mit-license.php)<br/> Redistributions of files must retain the above copyright notice.
统计信息
- 总下载量: 25
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2016-06-02