Thread: Calling MarkRH
View Single Post
Old November 10th, 2007, 9:14 PM   #6 (permalink)
MarkRH
Race Surpass
Super #1
 
MarkRH's Avatar
 
Joined in Jul 2006
Lives in Oklahoma City, OK
Hosted on sh102
1,222 posts
Gave thanks: 18
Thanked 86 times
Try this modified human_code.php:

PHP Code:
<?php
function randchr() {
    
$chr_array = array(chr(rand(48,57)), chr(rand(65,90)), chr(rand(97,122)) );
    return 
$chr_array[rand(0,2)];
}

    
session_start();

    
// generate random characters and output it as an image

    
$code randchr().randchr().randchr().randchr().randchr();
    
$im = @imagecreate(6020) or die("Cannot Initialize new GD image stream");
    
$background_color imagecolorallocate($im255255255);
    
$text_color imagecolorallocate($im2331491);
    
imagestring($im433,  $code$text_color);
    
$_SESSION['code'] = $code;
    
header("Content-type: image/gif");
    
imagegif($im);
    
imagedestroy($im);
?>
Hope it helps..
MarkRH is offline   Reply With Quote
This user thanks MarkRH for this great post!
wgm (November 10th, 2007)