Kohana helper method for Askimet


/ Published in: PHP
Save to your folder(s)



Copy this code and paste it in your HTML
  1. public function isSpam($values)
  2. {
  3. $akismet = new Akismet(url::base(), Kohana::config('comments.APIKey'));
  4. $akismet->setCommentAuthor($values['author']);
  5. $akismet->setCommentAuthorEmail($values['email']);
  6. $akismet->setCommentAuthorURL($values['url']);
  7. $akismet->setCommentContent($values['body']);
  8.  
  9. return $akismet->isCommentSpam();
  10. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.