<?
session_start();
unset($_SESSION["logcaptcha"]);
$logc=rand(1000,9999);
$_SESSION["logcaptcha"]=$logc;
$text=$logc;
header('content-type: image/png');
$img = ImageCreateFromPng('images/captcha.png');
$text=$logc;
$text_color = imagecolorallocate($img, 255, 255, 255);
imagestring($img, 3, 13, 1, $text, $text_color);
imagepng($img);
imagedestroy($img);
?>

