captchair.com - easy captcha webservice

javascript/php integration

First, apply for a new secure_id.

 

1. include javascript code in your form

<script type="text/javascript" src="http://www.captchair.com/js/captchair_ajax.js">
</script>
<script>
  Captchair("captcha_container", 12);
</script>

- the "12" is the font-size, you can set here "8","16" or any other value needed by your style.
- your can even output this script code as ajax!
- please ensure that a div with id "captcha_container" exists

 

2. place the captchair_proxy.php - class in the domain root folder

this is required to wrap ajax requests our to your server. you have to edit the secure_id setting in this file according to your secure_id.

 

3. verify the captcha code

call the _checkCaptchair - function and you get true for code is correct, or false for code was incorrect.

 

SIDEBAR