Download the PHP package fyrts/akismet without Composer
On this page you can find all versions of the php package fyrts/akismet. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download fyrts/akismet
More information about fyrts/akismet
Files in fyrts/akismet
Informations about the package akismet
Akismet
PHP client for the Akismet API. Akismet terms of use apply to usage of this library.
Installation
composer require fyrts/akismet
Usage
It's possible to set Akismet parameters directly if preferred. A list of parameters is available at the official API documentation.
If you'd like to provide all parameters by hand, you can just pass the array to the client directly.
Setting global parameters
For checking multiple comments, it's possible to set global language, charset and environment parameters for all requests.
Available endpoints
The following endpoints are accessible through the Akismet\Akismet class:
Akismet::verifyKey()
Akismet::check($comment)
orAkismet::commentCheck($comment)
Akismet::submitSpam($comment)
Akismet::submitHam($comment)
Available comment parameter methods
The following methods are accessible through the Akismet\Comment class for setting parameters:
Comment::setUserIp($ip)
Comment::setUserAgent($user_agent)
Comment::setReferrer($referrer)
orComment::setReferer($referrer)
Comment::setPermalink($permalink)
Comment::setType($type)
orComment::setCommentType($type)
Comment::setAuthor($author)
orComment::setCommentAuthor($author)
Comment::setAuthorEmail($email)
orComment::setCommentAuthorEmail($email)
Comment::setAuthorUrl($url)
orComment::setCommentAuthorUrl($url)
Comment::setContent($content)
orComment::setCommentContent($content)
Comment::setDate($date)
orComment::setCommentDate($date)
Comment::setPostModifiedDate($date)
orComment::setCommentPostModifiedDate($date)
Comment::setBlogLanguage($language)
Comment::setBlogCharset($charset)
Comment::setUserRole($role)
Comment::setTest()
Comment::setRecheckReason($reason)
Any custom parameters can be set through Comment::setParameter($key, $value)
.
Date parameters accept DateTime objects, unix timestamps or date strings in ISO 8601 format.
License
fyrts/akismet
is licensed under the MIT License (MIT). Please see LICENSE for more information.