atakde / akismet-php
PHP 8 的 Akismet 包装器
V1.0.0
2022-08-28 21:34 UTC
Requires
- php: >=8.0.9
- ext-curl: *
Requires (Dev)
- phpunit/phpunit: ^9.5
This package is not auto-updated.
Last update: 2024-09-24 06:21:31 UTC
README
一个用于 akismet 的 PHP 8 包。
安装
通过 composer 安装
composer require atakde/akismet-php
使用方法
require 'vendor/autoload.php'; $akismetPHP = new \Atakde\AkismetPhp\AkismetPhp(); $akismetPHP->setAkismetKey('YOUR_API_KEY') ->setCommentAuthor('Atakan') ->setCommentAuthorEmail('me@atakann.com') ->setCommentAuthorUrl('https://atakann.com') ->setCommentContent('This is a test comment') ->setBlogUrl('https://atakann.com') ->setPermalink('https://atakann.com') ->setReferrer('https://atakann.com') ->setCommentType('comment'); var_dump($akismetPHP->checkSpam());