I have made 3 files like this:
New Text Document.php
script.php
session_start();
$alphanum= "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
$rand = substr(str_shuffle($alphanum), 0, 5);
$_SESSION['image_random_value'] = md5($rand);
$image = imagecreate(35, 20);
$bgColor = imagecolorallocate ($image, 255, 255, 255);
$textColor = imagecolorallocate ($image, 0, 0, 0);
imagestring ($image, 3, 1, 2, $rand, $textColor);
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
header('Content-type: image/jpeg');
imagejpeg($image);
imagedestroy($image);
?>
2006-07-24
07:05:42
·
2 answers
·
asked by
QuestionAnswer
2