Download the PHP package romano83/akismet without Composer
On this page you can find all versions of the php package romano83/akismet. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download romano83/akismet
More information about romano83/akismet
Files in romano83/akismet
Package akismet
Short Description PSR-7 library to communicate with Akismet service to determine if a submitted comment to your website should be considered spam or not.
License MIT
Informations about the package akismet
Akismet PHP 7 class
A PHP-7 class to communicate with Akismet service to determine if a submitted comment to your website should be considered spam or not.
Installation
Requirements
- PHP 7.1
Steps to install
Run : composer require romano83/akismet
or in your composer.json file
How to use it
Before to use it, you need an Akismet API key. Once you have one, in order to check if a comment is a spam:
It's that simple!
If Akismet filter wrongly tags messages, you can use this following methods :
or
to submit mis-diagnosed spam and ham, which improves the system for everybody.
Others methods
This class provides you a set of methods in order to add parameters for comment check or submitted spam and ham. This methods are :
- setUserIp (required)
- setUserAgent (required)
- setReferrer (note spelling)
- setPermalink
- setCommentType
- setCommentAuthor
- setCommentAuthorEmail
- setCommentAuthorUrl
- setCommentContent
- setCommentDateGmt
- setCommentPostModifiedGmt
- setBlogLang
- setBlogCharset
- setUserRole
- setIsTest
All methods return self in order to have a fluent interface.
If you want more details for each method, look at the internal documentation or follow this link.
How to contribute
- create a ticket in Github if you have found a bug.
- create a new branch if you want to do a PR.
- you must add testcases