惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

酷 壳 – CoolShell
酷 壳 – CoolShell
T
Threatpost
Latest news
Latest news
N
News | PayPal Newsroom
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Help Net Security
Help Net Security
D
Darknet – Hacking Tools, Hacker News & Cyber Security
AI
AI
Simon Willison's Weblog
Simon Willison's Weblog
TaoSecurity Blog
TaoSecurity Blog
The Last Watchdog
The Last Watchdog
L
LINUX DO - 热门话题
Google DeepMind News
Google DeepMind News
T
Threat Research - Cisco Blogs
O
OpenAI News
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
T
The Exploit Database - CXSecurity.com
NISL@THU
NISL@THU
Application and Cybersecurity Blog
Application and Cybersecurity Blog
S
Securelist
小众软件
小众软件
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Martin Fowler
Martin Fowler
S
SegmentFault 最新的问题
Cisco Talos Blog
Cisco Talos Blog
云风的 BLOG
云风的 BLOG
AWS News Blog
AWS News Blog
GbyAI
GbyAI
N
News and Events Feed by Topic
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
美团技术团队
Engineering at Meta
Engineering at Meta
A
About on SuperTechFans
博客园 - 三生石上(FineUI控件)
S
Schneier on Security
博客园 - 聂微东
V2EX - 技术
V2EX - 技术
T
Troy Hunt's Blog
SecWiki News
SecWiki News
S
Secure Thoughts
B
Blog RSS Feed
Hugging Face - Blog
Hugging Face - Blog
WordPress大学
WordPress大学
腾讯CDC
H
Heimdal Security Blog
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Apple Machine Learning Research
Apple Machine Learning Research
月光博客
月光博客
www.infosecurity-magazine.com
www.infosecurity-magazine.com
P
Privacy International News Feed

Akismet

Introducing the official Akismet Drupal module Akismet v5.7: ready for Abilities and Connectors Version 5.6 of the Akismet WordPress plugin is available now Happy 20th Birthday Akismet Version 5.5 of the Akismet WordPress plugin is available now reCAPTCHA not stopping spam? Here’s the perfect alternative Version 5.4 of the Akismet WordPress plugin is available now Version 5.3.6 of the Akismet WordPress plugin is available now How to Collect Emails from Website Visitors (for Email Marketing) Email Leads: 17 Proven Tactics to Generate Them Effectively Version 5.3.5 of the Akismet WordPress plugin is available now
Introducing the official Akismet PHP SDK
Derek Springer June 15, 2026Updated on June 15, 2026 · 2026-06-15 · via Akismet

For twenty years, Akismet has kept spam out of WordPress. But spammers don’t care what your site runs on and neither do we.

Last month we launched the official Akismet Drupal module. Today we’re introducing the engine that powers it: the official Akismet PHP SDK, a first-party client that brings Akismet to any PHP application.

What it is, and who it’s for

The Akismet PHP SDK is a first-party PHP client for the Akismet API. It’s built for the platforms the WordPress plugin doesn’t reach: custom apps, SaaS backends, and PHP frameworks like Laravel and Symfony. (The official plugins are still the way to go for WordPress and Drupal.)

Under the hood it’s built to feel at home in a modern PHP codebase:

  • Covers the full Akismet API, from comment-check and spam/ham submissions to key verification, usage limits, and account stats.
  • Works with any PSR-18 HTTP client you already have (Guzzle, Symfony HttpClient, and the like) through auto-discovery.
  • Ships a typed exception hierarchy that redacts your API key, so credentials never leak into your logs.

A two-minute quick start

Install it with Composer:

composer require automattic/akismet-sdk

Then check a submission:

use Automattic\Akismet\Akismet;
use Automattic\Akismet\DTO\Content;
use Automattic\Akismet\Enum\ContentType;

$akismet = Akismet::create(
    apiKey: 'your-api-key',
    site: 'https://your-site.com',
);

$content = new Content(
    userIp: $_SERVER['REMOTE_ADDR'],
    userAgent: $_SERVER['HTTP_USER_AGENT'],
    body: $formData['message'],
    authorEmail: $formData['email'],
    type: ContentType::ContactForm,
);

$result = $akismet->check($content);

if ($result->isSpam()) {
    // Reject it, flag it, or queue it for review.
    // $result->shouldDiscard() marks the blatant spam you can drop outright.
}

That’s the loop: build a Content object, call check(), act on the result.

Already running in production

The official Akismet Drupal module is built on this SDK. The SDK handles the API contract and type safety, while the module handles Drupal’s service wiring, queues, and moderation UI. That’s the pattern for Laravel, Symfony, and anything else you build: the SDK owns the Akismet integration and your framework owns the glue.

What’s new in 1.5.0

We have just released v1.5.0, which is about giving Akismet more to work with, and giving you more back:

  • Richer content signals: Content now carries the site’s language and character set, plus the surrounding conversation context, so every check has more to go on.
  • More insight into every verdict: CheckResult now surfaces the error and classification Akismet returns, so you can log and act on why something was flagged, not just whether it was.
  • Extended multi-site reporting: For keys that span many sites, the new extended key-sites data adds per-site metadata for cleaner reporting and account hygiene.

Get started

The SDK is open source and live on Packagist today.

You’ll need an Akismet API key to make calls. Akismet’s Personal plan is pay-what-you-can and free for personal, non-commercial sites. If you’re running something commercial, pick a paid plan that matches your traffic. Either way your code stays identical, since the plan lives with your API key, not in the SDK.