PHPackages                             gsteel/akismet - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [HTTP &amp; Networking](/categories/http)
4. /
5. gsteel/akismet

ActiveLibrary[HTTP &amp; Networking](/categories/http)

gsteel/akismet
==============

Simple Akismet API Bindings

1.11.0(7mo ago)08.6k[1 issues](https://github.com/gsteel/akismet/issues)[4 PRs](https://github.com/gsteel/akismet/pulls)MITPHPPHP ~8.2 || ~8.3 || ~8.4 || ~8.5CI passing

Since Aug 31Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/gsteel/akismet)[ Packagist](https://packagist.org/packages/gsteel/akismet)[ RSS](/packages/gsteel-akismet/feed)WikiDiscussions 1.12.x Synced 1mo ago

READMEChangelog (10)Dependencies (17)Versions (27)Used By (0)

Akismet Client Library
======================

[](#akismet-client-library)

[![Continuous Integration](https://github.com/gsteel/akismet/actions/workflows/continuous-integration.yml/badge.svg)](https://github.com/gsteel/akismet/actions/workflows/continuous-integration.yml)[![Psalm Type Coverage](https://camo.githubusercontent.com/6d402493eb5daa16bb7eb5ec8171455d2bd0b26e5cf36c2a174e453ce6706756/68747470733a2f2f73686570686572642e6465762f6769746875622f67737465656c2f616b69736d65742f636f7665726167652e737667)](https://shepherd.dev/github/gsteel/akismet)[![Latest Stable Version](https://camo.githubusercontent.com/1159330ca6c35964a15d6c2deca9c2d2fceb5368c951d15c514fcfaa76f44b67/68747470733a2f2f706f7365722e707567782e6f72672f67737465656c2f616b69736d65742f762f737461626c65)](https://packagist.org/packages/gsteel/akismet)[![Total Downloads](https://camo.githubusercontent.com/e4e305446cfe235a2623cc6b38d13b745d3452f35f1f9fc4ff860147ef4cdccf/68747470733a2f2f706f7365722e707567782e6f72672f67737465656c2f616b69736d65742f646f776e6c6f616473)](https://packagist.org/packages/gsteel/akismet)

Introduction
------------

[](#introduction)

Provides a straight-forward way of using the [Akismet](https://akismet.com) anti-spam service in any-old PHP application.

Installation &amp; Requirements
-------------------------------

[](#installation--requirements)

Requires PHP `~8.0 || ~8.1 || ~8.2`

The library does not include an HTTP client, so if your project does not already have a [PSR-18 HTTP Client](https://www.php-fig.org/psr/psr-18/) installed, you will need to install one in order to use it. There are many [HTTP clients to choose](https://packagist.org/providers/psr/http-client-implementation) from, for example the popular libraries [Guzzle](https://packagist.org/packages/guzzlehttp/guzzle) or [HttpPlug](https://packagist.org/packages/php-http/curl-client).

The library also requires that you have a [PSR-17 (HTTP Factories) library](https://www.php-fig.org/psr/psr-17/) installed, again, you can find implementations on [Packagist](https://packagist.org/providers/psr/http-factory-implementation) and I personally favour [laminas/laminas-diactoros](https://packagist.org/packages/laminas/laminas-diactoros).

```
composer require laminas/laminas-diactoros
composer require php-http/curl-client
composer require gsteel/akismet
```

Basic Usage
-----------

[](#basic-usage)

### Construct a client

[](#construct-a-client)

Once you have the requisite HTTP related libraries installed, they *should* become discoverable with the shipped [discovery library](https://github.com/php-http/discovery). Provide an Api key, and the default website address that you will be operating with to the constructor, and you’ll have a ready-to-use client:

```
