How to use reCAPTCHA?

I read all the documentation for reCAPTCHA from Google, but it does not show an example code.

Can someone help me with the validation code, so the form is only submitted when the get_response() function or something else is returned.

I notice that I do not need to implement it in the ASP.NET module, but only JavaScript can be used instead.

Here is the page I'm talking about: http://code.google.com/intl/sv-SE/apis/recaptcha/docs/display.html

+4
source share
1 answer

The page you pointed out shows how to display reCAPTCHA using only JavaScript.

There is no method for checking reCAPTCHA using only JavaScript for two reasons:

  • To verify reCAPTCHA, you must use your private key, as described in Verifying user response without plugins . Doing this with client scripts ultimately provides a private key. reCAPCTHA relies on its secrecy.

  • Even if that were the case, it would be useless. Any way to prevent form submission using JavaScript can be easily undone (e.g., User Script ) and therefore offers no protection at all.

To test reCPATCHA, you can use either the method described in the link in 1. or one of your plugins . In any case, you need some kind of server-side scripting (PHP, ASP, Perl, etc.).

+4
source

Source: https://habr.com/ru/post/1397602/


All Articles