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,
rapt.ink,
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.
20 lines of code that will beat A/B testing every time

Cell Phones on Airplanes
Much ink has been spilled about the use of cell phones on airplanes. Here's the truth, which will be disappointing to conspiracy theorists: Cell phone signals most definately have an effect on other electronic equipment. Read on for more.Make a web page screenshot service
I'll take you step by step into how to make a service that takes screenshots of webpages and returns them as an image.Free, Raw Stock Data
Scraping financial information is easy with my friend, python.Experiment: Deleting a post from the Internet

C++: A language for next generation web apps
On Monday, I was pleased to be an uninvited speaker at Waterloo Devhouse, hosted in Postrank's magnificent office. After making some surreptitious alterations to their agile development wall, I gave a tongue-in-cheek talk on how C++ can fit in to a web application.How QBASIC almost got me killed

See sound without drugs
