You are hereBlogs / Eric Tou's blog / Setup CAPTCHA for Drupal

Setup CAPTCHA for Drupal

You are not authorized to post comments.

By Eric Tou - Posted on 30 July 2008

  My site has been published for several months, but only several friends knew it, therefore there are not so many comments. But recently someone start to annoy me by submitting comments spam.

  It’s troublesome that I delete the spams manually, how can a human fight againist a robot executed automatically? It’s time to take action to protect myself.

  CAPTCHA is a program that protects websites against bots by generating and grading tests that humans can pass but current computer programs cannot.

  CAPTCHAs have several applications for practical security, including (but not limited to):

  • Preventing Comment Spam in Blogs.
  • Protecting Website Registration.
  • Protecting Email Addresses From Scrapers.
  • Online Polls.
  • Preventing Dictionary Attacks.
  • Search Engine Bots.
  • Worms and Spam.

  In general you don’t need to make your own caprcha scripts. A free, secure and accessible CAPTCHA implementation is available from the reCAPTCHA project. Easy to install plugins are available for WordPress, MediaWiki, PHP, Perl, Python, and many other environments. reCAPTCHA is the officially recommended CAPTCHA implementation.

  Also, reCAPTCHA Stop spam and help digitize books at the same time! The words shown come directly from old books that are being digitized.

  It’s Easy. reCAPTCHA is a Web service. As such, adopting it is as simple as adding 4 lines of code on your site. For many applications and programming languages such as WordPress and PHP we also have easy-to-install plugins available. We generate and check the distorted images, so you don’t need to run costly image generation programs.


  What should I do for my drupal installation, remember? we always can find a module handle the job.

  The Captcha module is the basic CAPTCHA module that offers general CAPTCHA adminstration and a simple math challenge. (required by reCAPTCHA  module)

  Installation is like all normal modules.
  The configuration page is at admin/user/captcha (it’s different with other modules)
  Permission: “skip captcha

  The built-in text_captcha module offers another simple text based challenge.
  The built-in  image_captcha offers an image based challenge.

  If you plan on using image_captcha, you will have to install TTF fonts into the image_captcha/fonts or files directory.  You can find free fonts available at internet (read the readme to find the address)


  Or we can install the reCAPTCHA module upon Captcha module. The reCAPTCHA module uses the reCAPTCHA web service to improve the CAPTCHA system.

  Installation is easy, just go reading the document.

  • 简体中文
  • English

  This site's English part is still at early stage, only few translations of Chinese content available. If you are interested in my articles, try the Chinese part, just click the national flag. If you are not good at Chinese, you may try Google Traslate, although it could make things worse :-)