| 
<?php
// Velox Letum (2005)
 // [email protected]
 // http://www.nanoshock.net
 
 // Require the class code...
 require ('gd_image_verify.php');
 
 // Initialize class
 $gd = new gd_verification();
 
 if (isset($_POST['submit'])) {
 if ($gd->verify_string($_POST['gd_string'])) {
 $result = 'User input matches image string.';
 } else {
 $result = 'User input does not match image string.';
 }
 }
 ?>
 
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
 <head>
 <title>GD Image Verification Class Example</title>
 <head>
 <body>
 <div style="text-align:center;">
 <h1>GD Image Verification Class Example</h1>
 <? echo $result; ?><br /><br />
 <form name="gd_verify" method="POST" action="<? echo $PHP_SELF; ?>">
 <img src="gd_image.php" alt="Verification Image" /><br /><br />
 <? echo $gd->output_input_box('gd_string'); ?><br /><br .>
 <input type="submit" name="submit" value="Submit" />
 </form>
 </div>
 </body>
 </html>
 
 |