Skip to content

mcloide/CakePHP-Askimet-Component

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 

Repository files navigation

CakePHP Askimet Component

Askiment Spam Check for CakePHP

Have all methods necessary to connect with the Askimet api.

  • verify key: Key verification need only be used if you will have different users with their own Akismet licenses using your platform. This call will verify that they are using a valid API key.
  • comment check: Comment check is used to ask Akismet whether or not a given post, comment, profile etc. is spam
  • submit spam and submit ham: Submit Spam and Submit Ham are follow-ups to let Akismet know when it got something wrong (missed spam and false positives). These are also very important and you shouldn’t develop using the Akismet API without a facility to include reporting missed spam and false positives.

For more info on what parameters to pass on each method, check: http://akismet.com/development/api/

Requires

Current Version

1.0 Stable

Examples

	var_dump($this->Askimet->verify_key(array('key' => 'yourKey')));
	$params = array(
		'key' => 'yourKey',
		'comment_author' => 'viagra-test-123',
		'comment_author_email' => 'viagratest123@spamcheck.com',
		'comment_author_url' => '',
		'comment_content' => 'testing spam check with askimet',
		'permalink' => 'http://localhost',
		'comment_type' => 'comment',
	//	'debug' => true // enable this flag if you get an error response from comment check
	);
	var_dump($this->Askimet->comment_check($params));
	var_dump($this->Askimet->submit_spam($params));

	$params = array(
		'key' => 'yourKey',
		'comment_author' => 'a-valid-author',
		'comment_author_email' => 'a-valid-email@validomain.com',
		'comment_author_url' => '',
		'comment_content' => 'testing spam check with askimet',
		'permalink' => 'http://localhost',
		'comment_type' => 'comment'
	);
	var_dump($this->Askimet->comment_check($params));
	var_dump($this->Askimet->submit_ham($params));

Notes

  • Currently it is structured to work with CakePHP v2.x, but I believe that with a few tweaks it can easily works with previous versions

endorse

About

Askiment Spam Check for CakePHP 2.x as Component

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages