There is no license information available for the latest version (dev-master) of this package.

get geo information for IP Address

dev-master 2018-07-20 23:45 UTC

This package is not auto-updated.

Last update: 2024-10-07 14:34:04 UTC


README

Build Status Scrutinizer Quality Score Open Source Love

GEO IP

The Easiest way to Get all information about an IP Address using http://ip-api.com

Install

composer require "ahmedfaragmostafa/geo-ip":"dev-master"

Get Stared

use \Src\GeoIp;
 $ipInfo = new GeoIp('IP_ADDRESS'); 

Example

$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