What is CAPTCHA?
—————————————————————————————————————————————
CAPTCHA (Completely Automated Public Turing test to tell Computers and Humans Apart) is a distorted image of letters and numbers, used to prevent automated use of Websites from machines (generally called as bots). It adds security to your site. No bots can read distorted images as well as humans can do, so bots can’t harm sites protected by CAPTCHAs.
What is reCAPTCHA?
—————————————————————————————————————————————–
reCAPTCHA is a free CAPTCHA service which we can use in our site to make our site more secure. It also helps to digitize physical books, newspassspers those were written before the computer age. reCAPTCHA has highest security standards. Which extracts words from scanned book which can’t be read by OCR, then it adds more security by distoring even more and putting random lines. A reCAPTCHA’s CAPTCHA is generated by two distorted images from books.
More info: http://www.google.com/recaptcha/whyrecaptcha
Why to use reCAPTCHA?
—————————————————————————————————————————————
- It’s free to use.
- Secure (It also includes IP address detection). More info: http://www.google.com/recaptcha/security
- Theme support: We can change the theme of the reCAPTCHA control, it provides themes like ‘red’, ‘white’, ‘blackglass’, ‘clean’.
How to get it?
—————————————————————————————————————————————
The following steps can be followed to get reCAPTCHA.
- Sign up and create an account: Go to the following location and create an account (Sign up). In the Sign up process you have to give the Domain address of your site (e.g: www.ourgoalplan.com).
- Get Keys: After providing the Domain address, it will provide you two keys (1 Public key and 1 Private key).
- Download reCAPTCHA library: Then you can download reCAPTCHA library from this location – http://code.google.com/p/recaptcha/downloads/list?q=label:aspnetlib-Latest
How to use it?
—————————————————————————————————————————————
Put the library (Recaptcha.dll) in you application’s bin directory.
Register reCAPTCHA in the page where you want to use it by adding the following line –
Write the following piece of code to create reCaptcha control.
You can use Page.IsValid at code behind to check whether the CAPTCHA is valid or not.
if (Page.IsValid) // Check if Captcha is verified or not. { // Captcha provided by the user is valid. } else { // Captcha provided by the user is invalid. }
Here i have written the code in the button click event (where the button is not the part of the reCaptcha control).
How to use Theme?
————————————————————————————————————————————— reCAPTCHA provides several themes like ‘red’, ‘white’, ‘blackglass’, ‘clean’.
By code you can change the Theme of the reCAPTCHA control also. For applying theme we have to write the following code:
Here i have used the ‘clean’ theme.
How to reload reCAPTCHA? —————————————————————————————————————————————
Reloading reCAPTCHA indicates getting new set of images. If you are doing a complete page load then the reCAPTCHA images will load automatically but if you want to do a partial postback then you can reload the reCAPTCHA images throught javascript. By writng Recaptcha.reload(); in your javascript code you can reload the reCAPTCHA images.