1. Go to this page and download the library: Download abuseipdb/laravel 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/ */
public function check(string $ipAddress, int $maxAgeInDays = 30, bool $verbose = false): ResponseObjects\CheckResponse
public function report(string $ip, array|int $categories, string $comment = null, DateTime $timestamp = null): ResponseObjects\ReportResponse
public function reports(string $ipAddress, int $maxAgeInDays = 30, int $page = 1, int $perPage = 25): ResponseObjects\ReportsPaginatedResponse
public function blacklist(int $confidenceMinimum = 100, int $limit = 10000, bool $plaintext = false, $onlyCountries = [], $exceptCountries = [], int $ipVersion = null): ResponseObjects\BlacklistResponse|ResponseObjects\BlacklistPlaintextResponse
public function checkBlock(string $network, int $maxAgeInDays = 30): ResponseObjects\CheckBlockResponse
public function bulkReport(string $csvFileContents): ResponseObjects\BulkReportResponse
public function clearAddress(string $ipAddress): ResponseObjects\ClearAddressResponse
InvalidParameterException // Parameter passed in was invalid for the API.
MissingAPIKeyException // Your API key in your .env file was not found or invalid.
PaymentRequiredException // 402 error was thrown by API, indicating feature needs a higher subscription.
TooManyRequestsException // 429 error was thrown by API, indicating request limit has been exceeded.
UnprocessableContentException // 422 error was thrown by API, indicating request parameters could not be handled, either missing or incorrect.
UnconventionalErrorException // Error code other than 402, 422, or 429 was returned by the API.
use AbuseIPDB\Exceptions;
try {
/* some code */
}
catch(Throwable $e) {
if($e instanceof Exceptions\TooManyRequestsException) {
//429 was thrown, do something to address issue
}
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.