PHP code example of andrewbreksa / extreme-ip-lookup
1. Go to this page and download the library: Download andrewbreksa/extreme-ip-lookup library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
andrewbreksa / extreme-ip-lookup example snippets
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;