<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> <title>iCaptcha :: by Rochak Chauhan</title> </head> <body> <form action="index.php" method="post"> <table> <?php //display iCaptcha
require_once("iCaptcha.inc.php"); $iCaptcha = new iCaptcha(); echo $iCaptchaInfo=$iCaptcha->showICaptcha(true); ?> <tr> <td align="center" colspan="6"><input type="submit" name="submit" value="Submit Form"/></td> </tr> </table> </form> </body> </html> <?php //validate iCaptca if(isset($_POST['submit'])) { require_once("iCaptcha.inc.php"); $iCaptcha = new iCaptcha(); if($iCaptcha->validateICaptcha($_POST['captchaId'], $_POST['icaptcha'])){ die("YES"); } else { die("NO"); } } ?>
|