Download the PHP package matthewbdaly/akismet-client without Composer
On this page you can find all versions of the php package matthewbdaly/akismet-client. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download matthewbdaly/akismet-client
More information about matthewbdaly/akismet-client
Files in matthewbdaly/akismet-client
Informations about the package akismet-client
akismet-client
A PHP client for the Akismet spam detection service. Built using modern practices and with an extensive test suite.
Installation
Install it with the following command:
This library use HTTPlug, so you will also need to install a client implementation as specified here in order to actually use this client.
Usage
The client offers the following methds:
setKey($key)
- Sets the API keygetKey()
- Gets the API keysetBlog($blog)
- Sets the blog URLgetBlog()
- Gets the blog URLsetIp($ip)
- Sets the user IP addressgetIp()
- Gets the user IP addresssetAgent($agent)
- Sets the user agent stringgetAgent()
- Gets the user agent stringsetReferrer($referrer)
- Sets the referrer URLgetReferrer()
- Gets the referrer URLsetPermalink($permalink)
- Sets the permalink to the postgetPermalink()
- Gets the permalink to the postsetCommentType($type)
- Sets the comment type - can becomment
,forum-post
,reply
,blog-post
,contact-form
,signup
,message
or a custom typegetCommentType()
- Gets the comment typesetCommentAuthor($author)
- Sets the comment authorgetCommentAuthor()
- Gets the comment authorsetCommentAuthorEmail($email)
- Sets the comment author emailgetCommentAuthorEmail()
- Gets the comment author emailsetCommentAuthorUrl($url)
- Sets the comment author urlgetCommentAuthorUrl()
- Gets the comment author urlsetCommentContent($content)
- Sets the comment contentgetCommentContent()
- Gets the comment contentsetCommentDateGMT($date)
- Sets the comment dategetCommentDate()
- Gets the comment datesetCommentPostModifiedDate($date)
- Sets the comment modified dategetCommentPostModifiedDate()
- Gets the comment modified datesetBlogLang($lang)
- Sets the blog languagegetBlogLang()
- Gets the blog languagesetBlogCharset($charset)
- Sets the blog charsetgetBlogCharset()
- Gets the blog charsetsetUserRole($role)
- Sets the user rolegetUserRole()
- Gets the user rolesetIsTest($test)
- Sets whether this is a testgetIsTest()
- Gets whether this is a testflush()
- Flush all the existing valuesverifyKey()
- Verify the currently set API keycheck()
- Check the currently set comment to see if it is spamspam()
- Submit comment to Akisment as spamham()
- Submit comment to Akisment as hamsetParams(array $params)
- Set parameters in bulk
All of the set()
methods and the flush()
method are chainable, so you can do something like this:
Note that verifyKey()
, check()
, ham()
and spam()
do not flush the parameters, so ensure you do so before starting a new request.
All versions of akismet-client with dependencies
php-http/client-implementation Version ^1.0
php-http/httplug Version ^1.0
php-http/message-factory Version ^1.0
php-http/discovery Version ^1.0