Open main menu

CAPTCHA/Integration/The Anti-CAPTCHA/Stronger

< CAPTCHA‎ | Integration‎ | The Anti-CAPTCHA

This version of the Anti-CAPTCHA is stronger.

Contents

Form CodeEdit

JavaScriptEdit

document.write("<input type=hidden name=code value="+Math.random()+" />");

This must be in your form.

Use in an HTML form:

<script type="text/javascript">
document.write("<input type=hidden name=code value="+Math.random()+" />");
</script>

Server-Side CodeEdit

Use this:

<?php

if (!$_POST['code']) {
   // abort
}

?>

Problems with this versionEdit

It hinders the usability, as people with JavaScript disabled (for example, for security reasons) won't be able to access your form.

See alsoEdit