PHP Classes
elePHPant
Icontem

File: testSecurityImage.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Joel Finkel  >  Security Image  >  testSecurityImage.php  >  Download  
File: testSecurityImage.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Security Image
Generate images with text to make a CAPTCHA test
Author: By
Last change:
Date: 10 years ago
Size: 657 bytes
 

Contents

Class file image Download
<?

require "securityImageClass.php";

$si = new securityImage();
$si->setFontColor("000000");
$si->setFontSize(5);
$si->setCodeLength(8);
$si->inputParam = "style='color:blue;'";

if (isset(
$_POST['callback'])) {
    if (
$si->isValid()) {
        echo
"Code is valid";
    } else {
        echo
"Code is invald";
    }
}
?>
<html>
<body>

<form name=test action="<?=$_SERVER['PHP_SELF'] ?>" method=post>

<input type=hidden name='callback' value='1'>

<table>
<tr>
<td>Enter: <? echo $si->showFormInput() ?></td>
<td><? echo $si->showFormImage() ?></td>
</tr>
<tr>
<td colspan=2>
<input type=submit>
</td>
</tr>
</table>

</form>

</body>