RIP : Spam Comments [ 2003?- November 20, 2008 ]

I frakking hate comment spam on my blog. I’ve tried all sorts of tricks and plugins to help alleviate the amount I get. Akismet does a great job. And I have that Hot/Cold plugin on my site. I even changed the name of my comments.php file. But still, it comes.

What’s a blogger to do? Well, you could just remove all of the form code in the comments.php file so that there is simply no pipe for a spamBot to crawl down. But then users wouldn’t be able to comment either.

But wait, how about turning the comments form into a Flash form? That would do the trick. SpamBots would never be able to crawl over a SWF and figure out how to submit a comment.

What would we have to do to make this work?

  • someone would have to figure out the MySQL code for inserting a comment into the database
  • they would have to set up AMFPHP  for the SWF to Database communication
  • then create the Flash form – probably in Flex
  • and use FlashVars to get a few bits of data from the PHP code into the SWF
  • and with Flex we have the RichTextEditor. Cool, we can let users change fonts, font colors, underline, bold, italics, links. Man, that would be sweet!
  • Oh, and use SharedObjects to store user info so they only have to type in their name, email, website once
  • and since it’s Flash we should do something, you know, Flashy, that you can’t do with regular forms. Like, maybe make typewriter sounds when people type – with the obligatory Mute button of course

It would be so cool if some ultra-talented Flex developer would create something like that and give it away for others to use. Maybe even write a few tutorials on how it all works. And maybe the source code would look something like this.

Okay, seriously, I’ve commented the code pretty well. The comments are mainly for me because my code sucks and if I don’t comment I won’t be able to figure out what the hell I was doing when I try and update it later. So you won’t hurt my feelings if you find improvements.

The PHP file is in the source files but for some reason you can’t see the code in the source viewer. You’ll have to download the zip file to see it.

The only thing I can think of that’s missing is the code that triggers WordPress to notify the admin that a comment was submitted is missing. So the comments RSS isn’t being update, and I don’t think CommentLuv is working either. Hopefully someone can help me sort that out.

Take it for a spin, leave a comment.