Web Sequence Diagrams
Create sequence diagrams in seconds for free.
http://www.websequencediagrams.com

Why was this ad not blocked?
Comment spam defeated at last
Posted on: 2009-08-06 08:00:00
For years when running this blog, I would have to log in each day and delete a dozen comments due to spam. This was a chore, and I tried many ways to stem the tide.

Finally, a few months ago, I found a way that worked 100% of the time. This raw text file shows what I'm up against, containing all server variables and full text of every comment I've gotten in the last couple of months.

Here's the code for the comment form below. Can you spot my solution? (No, it's not the "http:" part, which almost worked)

    <div class="roundedcornr_top_473174"><div></div></div>
      <div class="roundedcornr_content_473174">
        <div id=commentBox class=commentBox> 
        <div class=pad>
        <h2>Post comment</h2>

        <form action="/blog/index.php" method=POST onsubmit="return validateCommentForm(this);">
        Real Name: <input type=text name=displayname /><br>
        <span style="visibility:hidden"> Your Email (Not displayed): <input type=text name="email"/></span><br>
        Text only. No HTML. If you write "http:" your message will be ignored.
        <br>
        <textarea cols=60 name=comment rows=10 wrap=soft ></textarea><br>
        <input type=submit value="Post" />

        <input type=hidden name=id value="75">
        </form>
        </div>
        <div class=comment>
        </div>
        </div>

      </div>

Want more programming tech talk?
Follow on Google Buzz
Subscribe to posts

Post comment

Real Name:
Your Email (Not displayed):
Text only. No HTML. If you write "http:" your message will be ignored.

Ryan Fox

2009-08-06 08:27:20
Is it that you reject anything that includes an email address?

rwhitworth

2009-08-06 11:38:29
So the spam bots auto fill the email field, whereas the rest of us using web browsers never even see the email field. Very nice. I wonder how long it'll be before the bot writers notice this and work around it.

Eric

2009-08-06 20:27:21
Brilliant! You can use JavaScript and external style sheets to make it even harder for the spam bots to know that field isn't displayed.

John

2010-01-15 21:41:22
Sucks to be using a screenreader hey? This fails in at least some of them ;)

jim dorey

2010-06-02 20:38:54
i was wondering, confused, about there being the hidden e-mail entry... i guess that was it...clever.
steve.hanov@gmail.com

Other posts by Steve

Compress your JSON with automatic type extraction JZBUILD - An Easy Javascript Build System Pssst! Want to stream your videos to your iPod? "This is stupid. Your program doesn't work," my wife told me Google Buzz gets less awful every day The simple and obvious way to walk through a graph Asking users for steps to reproduce bugs, and other dumb ideas Creating portable binaries on Linux Bending over: How to sell your software to large companies Regular Expression Matching can be Ugly and Slow C++: A language for next generation web apps qb.js: An implementation of QBASIC in Javascript (part 1) Zwibbler: A simple drawing program using Javascript and Canvas You don't need a project/solution to use the VC++ debugger Boring Date (comic) barcamp (comic) How IE <canvas> tag emulation works I didn't know you could mix and match (comic) Sign here (comic) It's a dirty job... (comic) Text-to-speech for domain names Pitching to VCs #2 (comic) Building a better rhyming dictionary Does Android team with eccentric geeks? (comic) Comment spam defeated at last Pitching to VCs (comic) How QBASIC almost got me killed Blame the extensions (comic) How to run a linux based home web server Microsoft's generosity knows no end for a year (comic) Using the Acer Aspire One as a web server When programmers design web sites (comic) Finding great ideas for your startup Game Theory, Salary Negotiation, and Programmers Coding tips they don't teach you in school When a reporter mangles your elevator pitch Test Driven Development without Tears Drawing Graphs with Physics Free up disk space in Ubuntu Keeping Abreast of Pornographic Research in Computer Science Exploiting perceptual colour difference for edge detection Experiment: Deleting a post from the Internet Is 2009 the year of Linux malware? Email Etiquette How a programmer reads your resume (comic) How wide should you make your web page? Usability Nightmare: Xfce Settings Manager Usability Nightmare: ktoon cairo blur image surface Automatically remove wordiness from your writing Why Perforce is more scalable than Git A complete blogging system in 1900 lines of php Optimizing Ubuntu to run from a USB key or SD card UMA Questions Answered Make Windows XP look like Ubuntu, with Spinning Cube Effect See sound without drugs Standby Preventer Stock Picking using Python Spoke.com scam Stackoverflow.com Copy a cairo surface to the windows clipboard Simulating freehand drawing with Cairo Free, Raw Stock Data Installing Ubuntu on the Via Artigo Why are all my lines fuzzy in cairo? Handling Unicode Form Data in PHP and Python A simple command line calculator Tool for Creating UML Sequence Diagrams Exploring sound with Wavelets A Fast Calorie Calculator for Windows UMA and free long distance UMA's dirty secrets Creating a Todo list in Ajax Installing the Latest Debian on an Ancient Laptop How to make the MSDN style tree view in Javascript Dissecting Adsense HTML/ Javascript/ CSS Pretty Printer Comment Spam Web Comic Aggregator Experiments in making money online How much cash do celebrities make? Draw waveforms and hear them Cell Phones on Airplanes Detecting C++ memory leaks What does your phone number spell? A Rhyming Engine Rules for Effective C++ Cell Phone Secrets