<?

session_start();
unset($_SESSION["copilca"]);
$logc=rand(1000,9999);
$_SESSION["copilca"]=$logc;
$text=$logc;
header("Content-type: image/png");
$img = ImageCreateFromPng('images/captcha.png');
$text=$logc;
$text_color = imagecolorallocate($img, 0, 120, 128);
imagestring($img, 6, 18, 1, $text, $text_color);
imagepng($img);
imagedestroy($img);
?>

