andrewbreksa / extreme-ip-lookup
A simple HTTP wrapper for eXTReMe-IP-LOOKUP.com
1.2.1
2022-02-26 19:27 UTC
Requires
- php: ^7.4|^8.0
- ext-json: *
- php-http/discovery: ^1.12
- php-http/httplug: ^2.2
- php-http/message-factory: ^1.0
- psr/http-message: ^1.0
- suin/json: ^1.2
Requires (Dev)
- friendsofphp/php-cs-fixer: ^2.18 || ^3.0
- mockery/mockery: ^1.4
- php-http/client-implementation: 1.0
- php-http/guzzle7-adapter: ^0.1.0 || ^1.0.0
- php-http/message: ^1.9
- php-http/mock-client: ^1.4
- phpstan/phpstan: ^0.12.82 || ^1.0.0
- phpunit/phpunit: ^9.4
- roave/security-advisories: dev-latest
- dev-main
- 1.2.1
- 1.2.0
- 1.1.1
- 1.1.0
- 1.0.0
- dev-dependabot/composer/php-http/discovery-1.17.0
- dev-dependabot/composer/phpstan/phpstan-1.10.14
- dev-dependabot/composer/guzzlehttp/psr7-2.5.0
- dev-dependabot/composer/phpunit/phpunit-9.6.7
- dev-dependabot/composer/friendsofphp/php-cs-fixer-3.16.0
- dev-dependabot/composer/mockery/mockery-1.5.1
This package is auto-updated.
Last update: 2024-11-27 12:28:25 UTC
README
A simple wrapper for eXTReMe-IP-LOOKUP.com
Installation
composer require andrewbreksa/extreme-ip-lookup
Usage
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.