Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dmyers/fuel-geolocate
A Geolocate Package for Fuel
https://github.com/dmyers/fuel-geolocate
Last synced: 1 day ago
JSON representation
A Geolocate Package for Fuel
- Host: GitHub
- URL: https://github.com/dmyers/fuel-geolocate
- Owner: dmyers
- License: mit
- Created: 2015-03-02T19:27:36.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-03-03T00:45:20.000Z (over 9 years ago)
- Last Synced: 2023-03-14T08:20:24.093Z (over 1 year ago)
- Language: PHP
- Homepage:
- Size: 180 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Fuel Geolocate Package
A Fuel package for integrating [MaxMind](http://maxmind.com)'s geoip database.
## About
* Version: 1.0.0
* License: MIT License
* Author: Bryce Johnston## Installation
Simply add the following to your composer.json require block:
'geoip/geoip'
### Git Submodule
If you are installing this as a submodule (recommended) in your git repo root, run this command:
$ git submodule add git://github.com/dmyers/fuel-geolocate.git fuel/packages/geolocate
Then you you need to initialize and update the submodule:
$ git submodule update --init --recursive fuel/packages/geolocate/
### Download
Alternatively you can download it and extract it into `fuel/packages/geolocate/`.
## Setup
### Run task
Run the oil task which will download and extract the GeoLiteCity.dat file into the vendor folder.
$ php oil r geolocate
### Download
Alternatively you can [manually download the GeoLiteCity.dat database](http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz) and extract into the vendor folder.
## Usage
```php
$location = Geolocate::forge($ip_address);
```
## UpdatesIn order to keep the package up to date simply run:
$ git submodule update --recursive fuel/packages/geolocate/