Welcome Guest, Not a member yet? Register   Sign In
Comment Spam
#1

[eluser]HSKrustofsky[/eluser]
I am in the process of updating my site. For now, it's a small site where a few buddies of mine who make comedy videos can post their content up, and people may come and comment on it. We also hope to get some advertisers for the site, but I digress.

I recently noticed that there is a bunch of spam in the comments. You know, people(bots) posting stuff about Viagra, life insurance, etc... Now I was searching around in the forums, Code Igniter Wiki, and online, and the only thing I could see was people talking about reCAPTCHA. I was wondering, for a small site like this, would I really need this. I'll do it if it's the best thing to do, but I was wondering if maybe there would be an alternative route.

Any suggestions?
#2

[eluser]cideveloper[/eluser]
I have used opencaptcha for a number of small projects. It is very easy to setup.

Akismet is also good for stopping spam. Elliot Haughin has a codeigniter library for Akismet.
#3

[eluser]Jow272[/eluser]
I got writ of the spam by not saving the post when it contains a link. So before saving the post check it for a link (which a spam message always has) and if so just don't save it.

eg.:

// now make sure to exclude spam remarks
$forbitten = array('href', '<a', 'a>');
$found_spam = FALSE;

foreach ( $forbitten as $needle )
{
if ( stristr($remark['Remark'], $needle) )
{
$found_spam = TRUE;
break;
}
}

if ( !$found_spam ) // only store the remark if it does not contain forbitten words
{
$this->Remark_model->create($remark);
$this->send_mail_to_writer($story_id, $remark);
}




Theme © iAndrew 2016 - Forum software by © MyBB