<?php
	session_start ();
	$rand = rand (10000, 99999);
	$_SESSION['img_num'] = md5($rand);
	$img = imagecreate (60,30);
	$bgc = imagecolorallocate ($img, 223, 223, 223);
	$txtCol = imagecolorallocate ($img, 0, 0, 0);
	imagestring ($img, 5, 8, 8, $rand, $txtCol);
	header("Expires: Mon, 4 Oct 1995 01: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($img);
	
	imagedestroy($img);
?>