reCAPTCHA – CAPTCHA control for handling form SPAM

captcha

Recently I used a free utility reCAPTCHA in my website contact form. The commonly accepted approach of handling form SPAM is by using a CAPTCHA control on your forms. reCAPTCHA helps prevent automated abuse of your site

Below are step-by-step instructions for integrating reCAPTCHA in your CI app.

  • Create a reCAPTCHA account
  • Download the reCAPTCHA PHP library
  • Use the library in your project

To change the theme and other options, simply create a dictionary called RecaptchaOptions in a script-tag:

<script>
var RecaptchaOptions = {
   theme: 'clean'
};
</script>
<div id="recaptcha_container">
<label for="recaptcha_response_field">Enter the two words below:</label>
<input type="text" id="recaptcha_response_field"
name="recaptcha_response_field" />
    <div id="recaptcha_image"></div>
<p>Choose captcha format:
<a href="javascript:Recaptcha.switch_type('image');">
Image</a>
or <a href="javascript:Recaptcha.switch_type('audio');">Audio</a> </p>
    <input type="button" id="recaptcha_reload_btn" value="Get new words"
onclick="Recaptcha.reload();" />
</div>
<script type="text/javascript"
src="http://api.recaptcha.net/challenge?k=INSERT_KEY_HERE">
</script>
<noscript>
<iframe src="http://api.recaptcha.net/noscript?k=INSERT_KEY_HERE">
 height="300"
width="500" frameborder="0"></iframe>
<textarea name="recaptcha_challenge_field" rows="3" cols="40">
</textarea>
<input type="hidden" name="recaptcha_response_field"
 value="manual_challenge" />
</noscript>

Absolutely, the reCAPTCHA website has detailed instructions for how to alter the look and feel of the reCAPTCHA form control.

http://www.google.com/recaptcha/whyrecaptcha

Share this nice post:

2 thoughts on “reCAPTCHA – CAPTCHA control for handling form SPAM

  1. Great article. Thank you to tell us more useful information. I am looking forward to reading more of your articles in the future.

Comments are closed.