PHPackages                             matthewbdaly/akismet-client - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. matthewbdaly/akismet-client

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

matthewbdaly/akismet-client
===========================

Akismet PHP client

0.1.0(8y ago)04MITPHP

Since Jan 3Pushed 8y ago1 watchersCompare

[ Source](https://github.com/matthewbdaly/akismet-client)[ Packagist](https://packagist.org/packages/matthewbdaly/akismet-client)[ RSS](/packages/matthewbdaly-akismet-client/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependencies (11)Versions (4)Used By (0)

akismet-client
==============

[](#akismet-client)

[![Build Status](https://camo.githubusercontent.com/c9c85cfdfd477b4b2cb88a51155639b704bee84ed1635d3b14ddc2d76cf83d1a/68747470733a2f2f7472617669732d63692e6f72672f6d6174746865776264616c792f616b69736d65742d636c69656e742e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/matthewbdaly/akismet-client)

A PHP client for the Akismet spam detection service. Built using modern practices and with an extensive test suite.

Installation
------------

[](#installation)

Install it with the following command:

```
composer require matthewbdaly/akismet-client
```

This library use HTTPlug, so you will also need to install a client implementation [as specified here](http://docs.php-http.org/en/latest/httplug/users.html) in order to actually use this client.

Usage
-----

[](#usage)

The client offers the following methds:

- `setKey($key)` - Sets the API key
- `getKey()` - Gets the API key
- `setBlog($blog)` - Sets the blog URL
- `getBlog()` - Gets the blog URL
- `setIp($ip)` - Sets the user IP address
- `getIp()` - Gets the user IP address
- `setAgent($agent)` - Sets the user agent string
- `getAgent()` - Gets the user agent string
- `setReferrer($referrer)` - Sets the referrer URL
- `getReferrer()` - Gets the referrer URL
- `setPermalink($permalink)` - Sets the permalink to the post
- `getPermalink()` - Gets the permalink to the post
- `setCommentType($type)` - Sets the comment type - can be `comment`, `forum-post`, `reply`, `blog-post`, `contact-form`, `signup`, `message` or a custom type
- `getCommentType()` - Gets the comment type
- `setCommentAuthor($author)` - Sets the comment author
- `getCommentAuthor()` - Gets the comment author
- `setCommentAuthorEmail($email)` - Sets the comment author email
- `getCommentAuthorEmail()` - Gets the comment author email
- `setCommentAuthorUrl($url)` - Sets the comment author url
- `getCommentAuthorUrl()` - Gets the comment author url
- `setCommentContent($content)` - Sets the comment content
- `getCommentContent()` - Gets the comment content
- `setCommentDateGMT($date)` - Sets the comment date
- `getCommentDate()` - Gets the comment date
- `setCommentPostModifiedDate($date)` - Sets the comment modified date
- `getCommentPostModifiedDate()` - Gets the comment modified date
- `setBlogLang($lang)` - Sets the blog language
- `getBlogLang()` - Gets the blog language
- `setBlogCharset($charset)` - Sets the blog charset
- `getBlogCharset()` - Gets the blog charset
- `setUserRole($role)` - Sets the user role
- `getUserRole()` - Gets the user role
- `setIsTest($test)` - Sets whether this is a test
- `getIsTest()` - Gets whether this is a test
- `flush()` - Flush all the existing values
- `verifyKey()` - Verify the currently set API key
- `check()` - Check the currently set comment to see if it is spam
- `spam()` - Submit comment to Akisment as spam
- `ham()` - Submit comment to Akisment as ham
- `setParams(array $params)` - Set parameters in bulk

All of the `set()` methods and the `flush()` method are chainable, so you can do something like this:

```
$client->setParams($params)
    ->setCommentType('comment')
    ->setCommentAuthor('Bob Smith')
    ->check();

```

Note that `verifyKey()`, `check()`, `ham()` and `spam()` do not flush the parameters, so ensure you do so before starting a new request.

###  Health Score

23

—

LowBetter than 26% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~3 days

Total

3

Last Release

3093d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/a596e5052494181ddc20aedefbebef191cc81008e320df098608c54a1dea7350?d=identicon)[matthewbdaly](/maintainers/matthewbdaly)

---

Top Contributors

[![matthewbdaly](https://avatars.githubusercontent.com/u/450801?v=4)](https://github.com/matthewbdaly "matthewbdaly (47 commits)")

---

Tags

spamAkismet

###  Code Quality

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/matthewbdaly-akismet-client/health.svg)

```
[![Health](https://phpackages.com/badges/matthewbdaly-akismet-client/health.svg)](https://phpackages.com/packages/matthewbdaly-akismet-client)
```

###  Alternatives

[razorpay/ifsc

Razorpay IFSC Codes Library

385204.4k](/packages/razorpay-ifsc)[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.5k5.8M712](/packages/sylius-sylius)[telnyx/telnyx-php

Official Telnyx PHP SDK — APIs for Voice, SMS, MMS, WhatsApp, Fax, SIP Trunking, Wireless IoT, Call Control, and more. Build global communications on Telnyx's private carrier-grade network.

35729.6k2](/packages/telnyx-telnyx-php)[florianv/exchanger

PHP exchange rate provider layer for currency conversion: 30 services, chain fallback, and caching.

1854.9M20](/packages/florianv-exchanger)[brd6/notion-sdk-php

Notion SDK for PHP

6021.6k](/packages/brd6-notion-sdk-php)[anthropic-ai/sdk

Anthropic PHP SDK

160372.1k14](/packages/anthropic-ai-sdk)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
