[ PHPXref.com ] [ Generated: Sun Jul 20 20:37:45 2008 ] [ textTHaCAA 0.3 ]
[ Index ]     [ Variables ]     [ Functions ]     [ Classes ]     [ Constants ]     [ Statistics ]

title

Body

[close]

/ -> example.php (source)

   1  <?php 
   2  /*

   3      Text(THaCAA) - Text (Telling Humans and Computers Apart Automatically)

   4      a way of telling if the submitter of a web form is human or a bot by 

   5      getting them to answer a simple random question in a similar vein to

   6      the systems developed by www.captcha.net (Carnegie Mellon university) 

   7          but in an accessible way.

   8                               

   9      Copyright (C) 2006  Daniel G. Davies

  10      

  11      This library is free software; you can redistribute it and/or

  12      modify it under the terms of the GNU Lesser General Public

  13      License as published by the Free Software Foundation; either

  14      version 2.1 of the License, or (at your option) any later version.

  15      

  16      This library is distributed in the hope that it will be useful,

  17      but WITHOUT ANY WARRANTY; without even the implied warranty of

  18      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU

  19      Lesser General Public License for more details.

  20      

  21      You should have received a copy of the GNU Lesser General Public

  22      License along with this library; if not, write to the Free Software

  23      Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA

  24      

  25      Daniel Davies can be contacted via the web form at 

  26      http://system-x.info/?pageid=10&menutree=34,35

  27  */
  28  require  'textTHaCAA_options.php';
  29  require  'textTHaCAA.php';
  30  ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  31          "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  32        <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">    <head>
  33          <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  34          <title>TextTHaCAA test page</title>
  35      </head>
  36      
  37      <body>
  38          <?php
  39          $answer=textTHaCAA_answer();
  40              if (textTHaCAA_hasrun() and $answer==1) {
  41                  echo '<p>you passed the <acronym title="text (Telling Humans and Computers Apart Automatically)">textTHaCAA</acronym> test </p>';
  42              } else if (textTHaCAA_hasrun() and $answer==0) {
  43                  echo '<p>you failed the <acronym title="text (Telling Humans and Computers Apart Automatically)">textTHaCAA</acronym> test try again</p>';
  44              } else if (textTHaCAA_hasrun() and $answer==-1){
  45                  echo '<p>you failed the <acronym title="text (Telling Humans and Computers Apart Automatically)">textTHaCAA</acronym> test because your bot check session has expired try again</p>';
  46      };
  47               
  48          ?>
  49          <form action="?" method="get"> 
  50              <?php
  51                  textTHaCAA_ask();
  52              ?>
  53              <div>
  54                  <input name="submit" type="submit" />
  55              </div>
  56          </form>
  57          <p>
  58      <a href="http://validator.w3.org/check?uri=referer"><img
  59          src="http://www.w3.org/Icons/valid-xhtml10"
  60          alt="Valid XHTML 1.0 Strict" height="31" width="88" /></a>
  61        </p>
  62      </body>
  63  </html>


[ Powered by PHPXref - Served by Debian GNU/Linux ]