Text_CAPTCHA_Numeral
[ class tree: Text_CAPTCHA_Numeral ] [ index: Text_CAPTCHA_Numeral ] [ all elements ]

Source for file liveNumeral.php

Documentation is available at liveNumeral.php

  1. <?php
  2.  
  3. require_once 'Text/CAPTCHA/Numeral.php';
  4. $numcap = new Text_CAPTCHA_Numeral;
  5.  
  6. if (isset($_POST['captcha']&& isset($_SESSION['answer'])) {
  7.     if ($_POST['captcha'== $_SESSION['answer']{
  8.         $errors['Ok.. YOu might be human..';
  9.     else {
  10.         $errors['You are or not human or dumb';
  11.     }
  12. }
  13.     if (!empty($errors)) {
  14.         foreach ($errors as $error{
  15.             print "<h1><font color='red'>$error</font></h1><br />";
  16.         }
  17.     }
  18.  
  19.  
  20.     print '
  21.         <form name="capter" action="'.$_SERVER['PHP_SELF'].'" method="post">
  22.          <table>
  23.           <tr>
  24.            <th>What is this result pilgrim?: '.$numcap->getOperation().'</th>
  25.            <td><input type="text" value="" name="captcha" /></td>
  26.           </tr>
  27.           <tr>
  28.            <th/>
  29.            <td><input type="submit" value="Let me prove you that I am human!" /></td>
  30.           </tr>
  31.         </form>
  32.     ';
  33.     $_SESSION['answer'$numcap->getAnswer();

Documentation generated on Mon, 11 Mar 2019 15:56:39 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.