A simple wrapper for eXTReMe-IP-LOOKUP.com
composer require andrewbreksa/extreme-ip-lookup
use AndrewBreksa\ExtremeIPLookup\Client;
use GuzzleHttp\Client as GuzzleClient;
use Http\Adapter\Guzzle7\Client as GuzzleAdapter;
use Http\Message\MessageFactory\GuzzleMessageFactory;
$client = new Client(
new GuzzleAdapter(new GuzzleClient()),
new GuzzleMessageFactory(),
getenv('EXT_IP_KEY')
);
$ip = '63.70.164.200';
$result = $client->lookup($ip);
echo $result->isp . PHP_EOL;
\AndrewBreksa\ExtremeIPLookup\Client::lookup
returns an instance
of \AndrewBreksa\ExtremeIPLookup\IPResult
on success, and
throws \AndrewBreksa\ExtremeIPLookup\ExtremeIPLookupException
on error.