How to redirect form to a verification code?

-2

When the user clicks "Sign up," the service asks you to enter the security check words. If you can not read what is written, you can click on the "Try different words" link, or you can hear the words by clicking on "a sound captcha".

    
asked by anonymous 02.10.2014 / 05:45

1 answer

1

Captcha (by Wikipedia )

  CAPTCHA is an acronym for the expression "Completely Automated Public Turing test to tell Computers and Humans Apart" (a fully automated public Turing test for differentiation between computers and humans): a cognitive challenge test, used as an anti-spam tool, pioneered at Carnegie-Mellon University. As the test is administered by a computer, in contrast to the standard Turing test that is administered by a human, this test is actually correctly described as a reverse Turing test.

An example of captcha with reCAPTCHA

Sample HTML form with excerpt:

<form method="post" action="verify.php">
    <?php
        require_once('recaptchalib.php');
        $publickey = "your_public_key"; // cadastre-se no link informado acima
        echo recaptcha_get_html($publickey);
    ?>
    <input type="submit" />
</form>

Excerpt to server-side validate:

<?php
  require_once('recaptchalib.php');
  $privatekey = "your_private_key"; // observe a imagem em anexo.
  $resp = recaptcha_check_answer ($privatekey, $_SERVER["REMOTE_ADDR"], $_POST["recaptcha_challenge_field"], $_POST["recaptcha_response_field"]);

  if (!$resp->is_valid) {
      // seu fluxo caso o usuário tenha errado o captcha
  } else {
      // seu fluxo caso o usuário tenha acertado o captcha
  }
?>

Additional information after you sign up for API usage:

Source and additional documentation

A curiosity about reCAPTCHA (offtopic, by Wikipedia )

  

The reCAPTCHA service provides, for   words that optical character recognition (OCR) software does not   was able to identify. These registered sites (which your   purposes are not usually related to project   scanning) present these images to humans   decipher as CAPTCHAs, as part of your procedure   normal validation. Then they return the results to the service   reCAPTCHA, which sends these results to the digitization of its   projects.

    
02.10.2014 / 06:34