you should use the akismet.php class

like

include (TEMPLATEPATH . "/inc/akismet.php");
                        
$_POST['name'] = preg_replace("|[^a-z0-9 \-.,]|i", "", $_POST["name"]);
$_POST['url'] = preg_replace("|[^a-z0-9 \-.,]|i", "", $_POST["url"]);
$_POST['email'] = preg_replace("|[EMAIL PROTECTED]|i", "", $_POST["email"]);
$_POST['msg'] = strip_tags($_POST['msg]);

$akismet = new Akismet( bloginfo('url') , get_option('wordpress_api_key') );
$akismet->setCommentAuthor($_POST['name']);
$akismet->setCommentAuthorEmail($_POST['email']);
$akismet->setCommentAuthorURL($_POST['url']);
$akismet->setCommentContent($_POST['msg']);
$akismet->setPermalink('');

if($akismet->isCommentSpam())
{
// error msg, this is spam!
}
else
{
  mail() //send the mail
}


On 9/13/06, Ryan Duff <[EMAIL PROTECTED]> wrote:
fullo wrote:
>> Why noy implement a graphical confirm ?
>
> or why not add the akismet support...
>

Is there an API for akismet that we can plug in to? This was on my
wishlist, but I haven't taken the time to see if it was feasible or not.
If so it would be GREAT!

--
Ryan Duff
http://ryanduff.net
AIM: ryancduff
irc.freenode.net #wordpress #plogger
_______________________________________________
wp-testers mailing list
[email protected]
http://lists.automattic.com/mailman/listinfo/wp-testers



--
Francesco Fullone
nulla รจ impossibile per chi non lo deve fare!
mail [EMAIL PROTECTED] ------ icq 13515051
homepage            http://www.fullo.net/blog/
_______________________________________________
wp-testers mailing list
[email protected]
http://lists.automattic.com/mailman/listinfo/wp-testers

Reply via email to