Spam Versus Comments

will posted 10/22/08 @ 12:19AM EST

Some of you might have noticed that commenting on my posts has been a little screwy recently; allow me to explain.

Prior, my system worked well; it works as follows. A comment is posted by someone, and it appears instantly. It then appears on my control panel, and I can flag it to keep or delete. Once I manually approve the comment, that's when any notifications go through. Or, I can add a spam string to my list of filters. When I do this, I add a string such as one of the following:

dreaminteen.com
dreamkoska.com
e-junkie.com
easymedics.com
email invitation virus
escortrussia.info
ezo.drzp.org
files.lartrk.webnode.com
find cheap hotel
floridaforeclosureassistance.com
forex.blogquarters.com
free blonde video clip
free gay asian porn

(Hmm I wonder how many visitors will arrive due to those search terms appearing on this page...)

Uploaded file

Then, all comments which haven't been flagged as approved, as well as all comments posted in the future are scanned against my list of spam strings. If a comment finds a match it's automatically deleted.

At some point, something went wrong, and all posts were being marked as spam and were being deleted. I've temporarily disabled spam filtering, but this requires going through hundreds of spam comments a day, checking if any real comments have been posted. This is tedious, and usually disappointing, since not many comments are really posted.

As a result, I need to revamp the system. My plan to improve the system involves three steps:

1) I'll rewrite the code which checks for string matches. I'm not sure what went wrong, but I'll take another stab at it.

2) Instead of having comments be deleted, I'll have them flagged as spam; they won't appear on the site, but they'll still be in my database 'til I approve their deletion.

3) Once I approve a comment, the email address of that commenter will be logged, and any future comments posted with that email address will be approved, and won't be subject to the spam filter.

Uploaded file

I'll get to that sometime, maybe this week, maybe not. If anyone has any other suggestions for developing this system, let me know. And nobody dare suggest using captchas; I hate Captchas.

Photo: Flickr
Photo: Flickr

PHP is fun
But comment spam is not fun
Let the fight begin


Godspeed.


This posted tagged as: will and beyond

Recent posts tagged as will and beyond:
Name:


Website:


Enter a valid email:

(Gravatars and retaggr profiles are supported.)

Receive notification of followup comments?
Yes No

Comment:
(First time commenters: Don't post links or you'll be flagged as spam.)


Reply to main post. (To reply to an individual comment, select it above.)