-
Notifications
You must be signed in to change notification settings - Fork 8
A CakePHP Plugin for finding a location based on an IP Address using the MaxMind GeoIP database and the PEAR Net_GeoIP package
Pollenizer/CakePHP-GeoIP-Plugin
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
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. Add <code>CakePlugin::load('GeoIp');</code> to <code>bootstrap.php</code> 3. Download the MaxMind GeoLite City Database at http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz 4. Uncompress the database to app/Plugin/GeoIp/data/GeoIP.dat USAGE --------------- ```php App::uses('GeoIpLocation', 'GeoIp.Model'); $GeoIpLocation = new GeoIpLocation(); $ipAddr = CakeRequest::clientIp(false); $location = $GeoIpLocation->find($ipAddr); ```
About
A CakePHP Plugin for finding a location based on an IP Address using the MaxMind GeoIP database and the PEAR Net_GeoIP package
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published