PHP Classes

File: example.php

Recommend this page to a friend!
  Classes of Mr.Empty  >  PHP Click CAPTCHA  >  example.php  >  Download  
File: example.php
Role: Example script
Content type: text/plain
Description: Example script
Class: PHP Click CAPTCHA
CAPTCHA validation checking where the user clicks
Author: By
Last change:
Date: 9 years ago
Size: 1,450 bytes


Class file image Download
$ClickCaptcha = new ClickCaptcha();

// simple demonstration!
$request = isset($_GET['request']) ? $_GET['request'] : '';
    //$ClickCaptcha->display([0-8], [3-10]);
}else if(
$position = isset($_POST['position']) ? $_POST['position'] : array(0, 0);
$verifysession = $ClickCaptcha->validate($position[0], $position[1]);
$verifysession = $verifysession?'true':'false';
?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "">
<html xmlns="">
        <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
        <div style="TEXT-ALIGN: center">
            <?php if($request=='submit'){ ?><span id="return">
                Captcha: <span><?php echo $verifysession ?></span>, Position: <span><?php echo $position[0].', '.$position[1] ?></span>
            </span><?php } ?>
<form action="example.php?request=submit" method="POST">
                <input type="image" name="position[]" src="example.php?request=captcha" />
            </form><br />
            <span><a href="example_ajax.php">Ajax&nbsp;&gt;&gt;</a></span>

For more information send a message to info at phpclasses dot org.