Login   Register  
PHP Classes
elePHPant
Icontem

File: include/index.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Mohammad Dayyan  >  Dayyan's CAPTCHA Image  >  include/index.php  >  Download  
File: include/index.php
Role: Example script
Content type: text/plain
Description: Generate image
Class: Dayyan's CAPTCHA Image
Generate images for CAPTCHA validation
Author: By
Last change: new version
Date: 5 years ago
Size: 759 bytes
 

Contents

Class file image Download
<?php
/*
Created by Mohammad Dayyan - 1387/3/2
Mds_Soft@yahoo.com
*/
define("MohammadDayyan"true);

try
{
    include_once(
"DayyanConfirmImageClass.php");
    include_once(
"DayyanRandomCharactersClass.php");

    
$id = (isset($_REQUEST['id']) && !empty($_REQUEST['id'])) ? trim($_REQUEST['id']) : exit;
    
$key = (isset($_REQUEST['key']) && !empty($_REQUEST['key'])) ? trim($_REQUEST['key']) : exit;

    
$DayyanRandomCharacters = new DayyanRandomCharacters();
    
$ConfirmString strtoupper($DayyanRandomCharacters -> md5_decrypt($id$key));

    
$DayyanConfirmImage = new DayyanConfirmImage($ConfirmString);
    
$DayyanConfirmImage -> ShowImage();
}
catch(
Exception $ex)
{
    echo 
'Caught exception: ',  $ex -> getMessage(), "<br />\n";
    exit;
}


?>