<?php
session_start();
$_SESSION['pswd']=rand(1000,9999);
header ("Content-type: image/gif");
$im = imagecreate(40,20);
$c1 = imagecolorallocate($im, 246, 247, 249);
$c2 = imagecolorallocate($im, 0, 0, 0);
imagettftext($im, 12,0,1,16, $c2, "style/font.ttf", $_SESSION['pswd']."");
imagepng($im);
imagedestroy($im);
?>