ob_start();
session_start();
$textstr = '';
$textstr = rndCharGen( 8, 'Int' );
$hashtext = md5( $textstr );
$_SESSION['strSec'] = $hashtext;
IF ( produceSecurityImage( $textstr, $hashtext ) != IMAGE_ERROR_SUCCESS ) {
header( "Content-Type: image/gif" ); # Output Header
$errorFilename =SCRIPT_DIR . 'simg/images/simg_error.gif'; #output error image
//fclose( $errorFilename );
$fp = fopen( $errorFilename, 'r' );
$fsize = filesize( $errorFilename );
IF ( $fp ) {
ECHO fread( $fp, $fsize );
}
fclose( $fp );
}
ob_end_flush();
The above code I uses on my existing scripts but when I try it with fast template of course the image does not show up where it suppose to....I would like to convert it to use fast template or do you have an SIMG system that works? |