How to redirect form to a verification code?

Asked

Viewed 436 times

-2

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

SS

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-human toolspam, pioneered at Carnegie-Mellon University. As the test is administered by a computer, in contrast to the standard Turing test which is administered by a human, this test is actually correctly described as a reverse Turing test.

An example of captcha with reCAPTCHA

Example HTML form with snippet:

<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>

Chunk to validate from the server side:

<?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 register to use the API:

Painel de controle reCAPTCHA

Additional source and documentation

A curiosity about reCAPTCHA (Offtopic, by Wikipedia)

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

Browser other questions tagged

You are not signed in. Login or sign up in order to post.