Download the PHP package reddingwebdev/abuseipdb without Composer

On this page you can find all versions of the php package reddingwebdev/abuseipdb. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package abuseipdb

AbuseIPDB PHP Client

A framework-agnostic PHP client for the AbuseIPDB APIv2, built on PSR-18/PSR-17, with an optional Symfony bundle. You can even use this with vanilla PHP projects with no formal framework!

Installation

If you already have a PHP Framework (Laravel, Symfony, etc) you're all done.

Otherwise, if you don't already have a PSR-18 HTTP client, you'll also need:

Standalone usage - simple setup

(Symfony Instructions and Advanced Standalone examples are later on)

check

Look up a single IP address and retrieve its abuse confidence score and, optionally, recent reports.

reports

Retrieve the reports associated with an IP address, with pagination and an optional report-age window.

blacklist

Download the current AbuseIPDB blacklist as structured entries or as a plaintext IP list.

report

Submit an abuse report for an IP address using one or more documented report categories.

check-block

Check an IP network in CIDR notation and retrieve reported-address counts within that block.

bulk-report

Submit multiple abuse reports at once by uploading a CSV file or passing CSV contents.

clear-address

Remove your reports for an IP address and retrieve the number of reports deleted.

Error handling

Every exception thrown by the library implements AbuseIpDb\Exception\AbuseIpDbException.

Situation Exception
HTTP 401 AuthenticationException
HTTP 402 PaymentRequiredException
HTTP 422 ValidationException (getFieldErrors())
HTTP 429 RateLimitExceededException (getRetryAfter())
HTTP 5xx ServerException
Transport failure NetworkException
Malformed body UnexpectedResponseException

Invalid input (bad IP, empty categories, out-of-range values) is rejected before any HTTP call.

Rate limits

All fields are nullable when the headers are absent. API exceptions also expose getRateLimit().

Responses are not cached; caching check results is left to your application.

Standalone usage - more options

Symfony

The bundle is optional and inert unless you register it (requires symfony/framework-bundle or symfony/http-kernel + symfony/dependency-injection).

There is a Symfony Flex Recepie which has been created and submitted to Symfony for automatic prompting when you perform a composer require or composer install - this is currently pending, but once approved, the bundle will be automatically registered and configured for you. The only step required will be inserting your API Key either via the .env file or via Symfony Secrets.

Storing the API key

ABUSEIPDB_API_KEY is just an environment variable, so you can set it however your deployment normally handles secrets.

Flex writes a placeholder ABUSEIPDB_API_KEY= line into .env on install. For local development, put the real value in .env.local (git-ignored), or in an environment-specific .env.<env>.local:

For staging/production, prefer Symfony's encrypted secrets vault instead of plaintext env values:

No configuration change is needed for this — Symfony exposes vault secrets as environment variables at runtime, so the existing %env(ABUSEIPDB_API_KEY)% in abuse_ip_db.yaml picks it up automatically. Use .env.local for local development convenience, and secrets:set for anything deployed, since it keeps plaintext keys out of your environment/CI configuration.

Then autowire the client:

The service is also available as abuse_ip_db.client.

Troubleshooting: "Cannot autowire ... is type-hinted \"string\""

If one of your own services or commands type-hints the raw API key directly, e.g.:

you will get an error like:

This is a general Symfony limitation, not specific to this bundle: autowiring only works for object arguments, so a bare scalar type-hint (string, int, array, etc.) can never be autowired, no matter how the value is exposed.

Development

Versioning & publishing

This package is published on Packagist as reddingwebdev/abuseipdb from the canonical GitHub repository. This package follows Semantic Versioning.

License

MIT — see LICENSE.


All versions of abuseipdb with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4
php-http/discovery Version ^1.19
psr/http-client Version ^1.0
psr/http-factory Version ^1.0
psr/http-message Version ^1.1 || ^2.0
psr/log Version ^1.1 || ^2.0 || ^3.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package reddingwebdev/abuseipdb contains the following files

Loading the files please wait ...