library.php
Tags
Table of Contents
Classes
Constants
- AKISMET_INVALID_KEY = 2
- AKISMET_RESPONSE_FAILED = 1
- AKISMET_SERVER_NOT_FOUND = 0
- 08.11.2010 22:25:17est
Constants
AKISMET_INVALID_KEY
public
mixed
AKISMET_INVALID_KEY
= 2
AKISMET_RESPONSE_FAILED
public
mixed
AKISMET_RESPONSE_FAILED
= 1
AKISMET_SERVER_NOT_FOUND
08.11.2010 22:25:17est
public
mixed
AKISMET_SERVER_NOT_FOUND
= 0
Akismet PHP4 class
Usage
$comment = array(
'author' => 'viagra-test-123',
'email' => 'test@example.com',
'website' => 'http://www.example.com/',
'body' => 'This is a test comment',
'permalink' => 'http://yourdomain.com/yourblogpost.url',
);
$akismet = new Akismet('http://www.yourdomain.com/', 'YOUR_WORDPRESS_API_KEY', $comment);
if($akismet->errorsExist()) { echo"Couldn't connected to Akismet server!"; } else { if($akismet->isSpam()) { echo"Spam detected"; } else { echo"yay, no spam!"; } }