In my example, I navigate people either to a confirmation.htm page if the values are entered correctly or to captchaincorrect.htm if the values are entered incorrectly. You can do whatever you want for either of these cases! That's all there is to it. Well, that is all there is to adding a reCAPTCHA test to a contact form. How to add a CAPTCHA to your website. Whichever CAPTCHA you decide to use, code snippets are usually provided by the CAPTCHA provider. The CAPTCHA service provider can often be configured to only display CAPTCHA codes that you approve of, and your email address will be used for notifications.
I have all my code set up exactly how Google documents the API but it keeps returning a boolean of false, is there something wrong that I have done?
and my HTML form with the JavaScript link copied from Google and the>99 gold badges2222 silver badges3636 bronze badges
Gerald MathabelaGerald Mathabela
1 Answer
Add this script:
and add this HTML before your submit button:
Nisse Engström
4,21399 gold badges2222 silver badges3636 bronze badges
RamanRaman
Not the answer you're looking for? Browse other questions tagged phphtmlrecaptcha or ask your own question.-->
by Microsoft
This article explains how to use ReCaptcha (a security measure) to prevent automated programs (bots) from performing tasks in an ASP.NET Web Pages (Razor) website.
What you'll learn:
These are the ASP.NET features introduced in the article:
Note
The information in this article applies to ASP.NET Web Pages 1.0 and Web Pages 2.
About CAPTCHAs
Any time you let people register in your site, or even just enter a name and URL (like for a blog comment), you might get a flood of fake names. These are often left by automated programs (bots) that try to leave URLs in every website they can find. (A common motivation is to post the URLs of products for sale.)
You can help make sure that a user is real person and not a computer program by using a CAPTCHA to validate users when they register or otherwise enter their name and site. CAPTCHA stands for Completely Automated Public Turing test to tell Computers and Humans Apart. A CAPTCHA is a challenge-response test in which the user is asked to do something that is easy for a person to do but hard for an automated program to do. The most common type of CAPTCHA is one where you see some distorted letters and are asked to type them. (The distortion is supposed to make it hard for bots to decipher the letters.)
Adding a ReCaptcha Test
In ASP.NET pages, you can use the
ReCaptcha helper to render a CAPTCHA test that is based on the ReCaptcha service (http://recaptcha.net). The ReCaptcha helper displays an image of two distorted words that users have to enter correctly before the page is validated. The user response is validated by the ReCaptcha.Net service.
Note
If your computer is on a domain that uses proxy server, you might need to configure the
defaultproxy element of the Web.config file. The following example shows a Web.config file with the defaultproxy element configured to enable the ReCaptcha service to work.
Additional ResourcesComments are closed.
|
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |