samedi 18 mars 2017

How to verify recaptcha on client side as well as server site

I'm building ReCaptcha in my website using below example. I want to know how can I verify this in client site and server site. Is it sufficient to verify whether user has checked the checkbox on client side and not check on server site? Also I need to count how many times users has failed to verify captcha.

<html>
  <head>
    <title>reCAPTCHA demo: Explicit render after an onload callback</title>
    <script type="text/javascript">
      var onloadCallback = function() {
        grecaptcha.render('html_element', {
          'sitekey' : 'your_site_key'
        });
      };
    </script>
  </head>
  <body>
    <form action="?" method="POST">
      <div id="html_element"></div>
      <br>
      <input type="submit" value="Submit">
    </form>
    <script src="http://ift.tt/1yW6XBL"
        async defer>
    </script>
  </body>
</html>




Aucun commentaire:

Enregistrer un commentaire