https://github.com/scullwm/dbip-client
Modern client library for the db-ip.com API services
https://github.com/scullwm/dbip-client
api-client api-client-php db-ip hacktoberfest hacktoberfest-accepted hacktoberfest2021
Last synced: 7 months ago
JSON representation
Modern client library for the db-ip.com API services
- Host: GitHub
- URL: https://github.com/scullwm/dbip-client
- Owner: ScullWM
- Created: 2021-09-08T19:49:40.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-10-04T20:27:21.000Z (over 4 years ago)
- Last Synced: 2025-05-30T16:37:31.003Z (8 months ago)
- Topics: api-client, api-client-php, db-ip, hacktoberfest, hacktoberfest-accepted, hacktoberfest2021
- Language: PHP
- Homepage:
- Size: 28.3 KB
- Stars: 0
- Watchers: 2
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
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`
```php
$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:
```bash
./vendor/bin/phpunit tests/
```