All pastes #265738 Raw Edit

Miscellany

public text v1 · immutable
·published 2006-12-03 16:35 UTC
rendered paste body
<?php
require_once("class.verificator.php");

header('Content-Type: text/xml');
echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
echo '<response>';

$code = new VeriFicator($_POST['captcha_code']);
$verified = $code->verified();
echo $verified
echo '</response>';
?>

<img src="image.veriword.php?width=200&height=80" width="200" height="80">
text verification <input name="captcha_code" type="text" id="captcha_code" />
<input type="button" value='Click' onClick='process();' />


function process() {
    if (xmlHttp.readyState == 4 || xmlHttp.readyState == 0) {
    code = encodeURIComponent(document.getElementById("captcha_code").value);
    xmlHttp.open("POST", "verify.php", true);  
    xmlHttp.onreadystatechange = handleServerResponse;
    xmlHttp.send("code=" + code);
  }
}