psp/ipgeobase

Client for ipgeobase.ru geolocation webservice

v1.0.0 2016-09-13 20:51 UTC

This package is not auto-updated.

Last update: 2024-04-22 12:05:26 UTC


README

Client for ipgeobase.ru geolocation webservice.

Requirements

IpGeoBase depends on PHP 5.5+ and Guzzle 6+.

Basic Usage

use \GuzzleHttp\Client;
use \PSP\IpGeoBase\IpGeoBase;

$http = new Client();
$geo  = new IpGeoBase($http);

$response = $geo->request('144.206.192.6');

if ($response->getStatus()) {
    echo $response->getCity();
}

License

Project code is licensed under the MIT License - see the LICENSE file for details.