Comment spam defeated at last
Posted 15 years ago
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>
Steve Hanov makes a living working on
Rhymebrain.com,
PriceMonkey.ca,
www.websequencediagrams.com,
and Zwibbler.com. He lives in
Waterloo, Canada.
Post comment
edit
Buy Viagra
twelve years ago
Cheap Cheap!! <a href="ftp://BuyNowViagraForSaleYeah.com/" />
just testing :P nice work
edit
jim dorey
14 years ago
i was wondering, confused, about there being the hidden e-mail entry... i guess that was it...clever.
edit
Eric
15 years ago
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.
edit
rwhitworth
15 years ago
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.