Skip to content

olakunlevpn/geoiplookup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PHP Geoiplookup

Geoiplookup.io IP's lookup, Perfect for PHP SDK applications.

Install

Via Composer

$ composer require olakunlevpn/geoiplookup

Usage

require_once "vendor/autoload.php";
use Olakunlevpn\Geoiplookup\GeoiplookupClient;

$Geoiplookup = new GeoiplookupClient();

$data = $Geoiplookup->lookUp();
echo $data->getIp();


// $data->getIp();
// $data->getIsp();
// $data->getOrganization();
// $data->getHostname();
// $data->getLatitude();
// $data->getLongitude();
// $data->getPostalCode();
// $data->getCity();
// $data->getCountryCode();
// $data->getCountry();
// $data->getContinentCode();
// $data->getContinentName();
// $data->getRegion();
// $data->getDistrict();
// $data->getTimeZone();
// $data->getConnectionType();
// $data->getAsnNumber();
// $data->getAsnOrg();
// $data->getAsn();
// $data->getCurrencyCode();
// $data->GetCurrencyName();

Pass custom ip address as variable

require_once "vendor/autoload.php";
use Olakunlevpn\Geoiplookup\GeoiplookupClient;

$Geoiplookup = new GeoiplookupClient();

$ipAddress = $_SERVER['REMOTE_ADDR']; 

$data = $Geoiplookup->lookUp($ipAddress);


echo $data->getIp();

Testing

$ phpunit

Credits

License

The MIT License (MIT). Please see License File for more information.

About

Geoiplookup.io IP's lookup, Perfect for PHP applications. https://geoiplookup.io/

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages