PHP - Question about using reCAPTCHA with jQuery

后端 未结 1 806
我寻月下人不归
我寻月下人不归 2021-01-24 16:37

Here is a tutorial that indicates how to combine jQuery Form Validation with reCAPTCHA. http://snipplr.com/view/15563/jquery-validating-recaptcha-with-ajax/

Based on my

相关标签:
1条回答
  • 2021-01-24 17:35

    Yes, that sounds correct to me. Yes, you definitely need to validate the captcha on the server. I don't like the idea of validating the captcha client-side at all and I don't think you want to be posting your reCaptchi API keys in a script that user can get hold of either. Also I'd expect the second validation of the same captcha values (your server-side check after the client-side checke) would get rejected by recaptcha's servers anyway (confirmation of this from a comment on the original blog).

    So I think you need to post the captcha to your AJAX action handler and it should do the validation as well as your action. You could validate the user has entered something for the captcha before you submit it but IMO you shouldn't try and validate it client side at all.

    0 讨论(0)
提交回复
热议问题