Login   Register  
PHP Classes
elePHPant
Icontem

File: example_handler.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of ~~  >  RainCaptcha  >  example_handler.php  >  Download  
File: example_handler.php
Role: Example script
Content type: text/plain
Description: Example
Class: RainCaptcha
Validate CAPTCHA images with RainCaptcha
Author: By
Last change:
Date: 2 years ago
Size: 630 bytes
 

Contents

Class file image Download
<html>
    <body>
        <?php
            
require_once('RainCaptcha.class.php');
            
$captcha = new RainCaptcha();

            if(isset(
$_REQUEST['captcha'])) {
                
$isCaptchaCorrect $captcha->checkAnswer($_REQUEST['captcha']);

                if(
$isCaptchaCorrect) {
                    echo 
'You have entered <strong>correct</strong> CAPTCHA code!';
                }
                else {
                    echo 
'You have entered <strong>wrong</strong> CAPTCHA code! <a href="example_form.php">Please try again!</a>';
                }
            }
        
?>
    </body>
</html>