scullwm / dbip-client
1.0.0
2021-09-11 20:06 UTC
Requires
- php: >=8.0
- ext-json: *
- php-http/discovery: ^1.14
- php-http/httplug: ^2.2
- php-http/message-factory: ^1.0
- psr/http-client: ^1.0
Requires (Dev)
- doctrine/coding-standard: ^9.0
- nyholm/psr7: ^1.4
- php-http/message: ^1.12
- php-http/mock-client: ^1.5
- phpunit/phpunit: ^9.5
This package is auto-updated.
Last update: 2025-01-05 03:59:46 UTC
README
DbIpClient
Modern client library for the db-ip.com API services
Getting Started
First of all, you need to define an add the API client in your project.
composer require scullwm/dbip-client
$dbipClient = new Client('my_secret_token'); $ipDetails = $dbipClient->getIpDetails('8.8.8.8'); $ipDetails->isRisky(); // false $apiThrottling = $dbipClient->getApiThrottling(); echo $apiThrottling->getQueriesLeft(); // 9996
Running the Test Suite
Once you have all dependencies installed via composer install
, you can run the test suite with:
./vendor/bin/phpunit tests/