<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="/stylesheets/rss.css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>Depth-First: Tag commentspam</title>
    <link>http://depth-first.com/articles/tag/commentspam</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>Walking the Web of Chemical Informatics</description>
    <item>
      <title>Fighting Comment Spam on the Cheap with CAPTCHA</title>
      <description>&lt;p&gt;&lt;a href="http://flickr.com/photos/63056612@N00/155554663/"&gt;&lt;img src="http://depth-first.com/demo/20070901/spam.jpg" align="right" border="0"&gt;&lt;/img&gt;&lt;/a&gt;If you run a blog or website that allows public input, you've almost certainly been subjected to a spam attack. This is a problem because even one successful attack can eat up hours of time. After a recent spam attack on this blog, comments were disabled altogether. They've now been restored with the help of a more robust kind of protection, which is the subject of this article.&lt;/p&gt;

&lt;p&gt;One of the best forms of spam protection is the &lt;a href="http://en.wikipedia.org/wiki/Captcha"&gt;Completely Automated Public Turing Test to Tell Computers and Humans Apart&lt;/a&gt; (CAPTCHA). CAPTCHA comes in many guises but usually consists of a noisy image of some text that a user must enter, like this one from &lt;a href="http://digg.com"&gt;Digg&lt;/a&gt;:&lt;/p&gt;

&lt;p&gt;&lt;center&gt;&lt;img src="http://depth-first.com/demo/20070901/diggcap.png"&gt;&lt;/img&gt;&lt;/center&gt;&lt;/p&gt;

&lt;p&gt;There are many CAPTCHA systems. The disadvantage most of them share is that they must be deployed on a server. Depending on your hosting situation and your platform, this may or may not be feasible. D-F is run by the &lt;a href="http://rubyonrails.org"&gt;Ruby on Rails&lt;/a&gt; blogging software &lt;a href="http://typosphere.org"&gt;Typo&lt;/a&gt;. Most CAPTCHA systems for Ruby require the installation of the C extension &lt;a href="http://rmagick.rubyforge.org/"&gt;RMagick&lt;/a&gt; and its dependencies, which is either difficult or impossible on many hosts.&lt;/p&gt;

&lt;p&gt;I recently found two solutions to this problem, and have implemented one of them:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href="http://captchas.net"&gt;captchas.net&lt;/a&gt;&lt;/strong&gt; This free service generates CAPTCHAs on a remote server, which your own server uses. By writing a small Ruby library and some glue code, I was able to integrate this solution, which is currently running on D-F. Here's an example in action:&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;center&gt;&lt;img src="http://depth-first.com/demo/20070901/dfcap.png"&gt;&lt;/img&gt;&lt;/center&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href="http://recaptcha.net"&gt;reCAPTCHA&lt;/a&gt;&lt;/strong&gt; Not only does this service generate CAPTCHAs for you, but your users actually help solve OCR problems in the process. Talk about a win-win situation. If this sounds impossible, check out the description &lt;a href="http://recaptcha.net/learnmore.html"&gt;here&lt;/a&gt;. As an added bonus, &lt;a href="http://recaptcha.net/resources.html"&gt;reCAPTHCA APIs&lt;/a&gt; are available in a number of languages, &lt;a href="http://www.loonsoft.com/recaptcha/"&gt;including Ruby&lt;/a&gt;. reCAPTCHA is currently used on popular sites such as &lt;a href="http://twitter.com"&gt;Twitter&lt;/a&gt; and looks like this:&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;center&gt;&lt;img src="http://depth-first.com/demo/20070901/recap.png"&gt;&lt;/img&gt;&lt;/center&gt;&lt;/p&gt;

&lt;p&gt;The struggle against spam is an arms race. Currently, the best weapon for legitimate content producers is CAPTCHA, but even it can be foiled by a determined spammer. If past history is any guide, even more sophisticated forms of spam attacks and countermeasures are just around the corner.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;image credit: &lt;a href="http://flickr.com/photos/63056612@N00/"&gt;freezelight&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;</description>
      <pubDate>Sat, 01 Sep 2007 11:07:00 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:9a6827e5-e000-4065-b4d2-7f9543f9c244</guid>
      <author>Rich Apodaca</author>
      <link>http://depth-first.com/articles/2007/09/01/fighting-comment-spam-on-the-cheap-with-captcha</link>
      <category>Tools</category>
      <category>commentspam</category>
      <category>captcha</category>
      <category>recaptcha</category>
      <category>ruby</category>
      <category>typo</category>
    </item>
  </channel>
</rss>
