Computing TITGIG

Spam-proofing my contact form with Akismet

For a while, I’ve used a contact form (written in PHP) instead of publishing my email address on this site, to thwart spammers. However, recently I’ve noticed an increasing number of spam messages being submitted through the contact form.

My first thought was to add a drop-down box where the user can select what their query is regarding – the default selected option is “My desire to sell you discount pharmaceuticals” and any messages submitted with this option would not be sent. However, the spammers (or the scripts that they use) would generally submit the form with a random selection from this box, so the majority of spam was still coming through.

I didn’t want to make the contact form difficult to use, so I looked into ways of filtering out spam using Akismet, the same application that protects the comments forms on this site (and a very good job it does, I might add).

You will need to download akismet.class.php and upload it to your web server. Rather than rewrite all the instructions here, I’ll point you to the perfectly adequate documentation that already exists.

2 replies on “Spam-proofing my contact form with Akismet”

Leave a Reply

Your email address will not be published. Required fields are marked *