library geo-ip
get geo information for IP Address
ahmedfaragmostafa/geo-ip
get geo information for IP Address
- Saturday, July 21, 2018
- by ahmedfaragmostafa
- Repository
- 1 Watchers
- 1 Stars
- 2 Installations
- PHP
- 0 Dependents
- 0 Suggesters
- 0 Forks
- 0 Open issues
- 1 Versions
- 0 % Grown
, (*1)
GEO IP
The Easiest way to Get all information about an IP Address using http://ip-api.com, (*2)
Install
composer require "ahmedfaragmostafa/geo-ip":"dev-master"
Get Stared
``` php
use \Src\GeoIp;
$ipInfo = new GeoIp('IP_ADDRESS');, (*3)
## Example
``` php
$ipInfo = new \Src\GeoIp('85.203.13.62');
$ipInfo->getCountry(); //France
$ipInfo->getCountryCode(); //FR
$ipInfo->getLon(); //2.3292
$ipInfo->getLat(); //48.8628
$ipInfo->getCity(); //Paris
$ipInfo->getRegionName(); //Île-de-France
$ipInfo->getRegion(); //IDF
$ipInfo->getZip(); // 75001
$ipInfo->getTimezone(); // Europe/Paris
$ipInfo->getOrg(); //Falco Networks
Tests
vendor/bin/phpunit tests
dev-master
9999999-dev
get geo information for IP Address
Sources
Download
The Requires
The Development Requires
by
Ahmed Farag