File size: 620B
<?php
$code = $_GET['code'];
$code = str_replace('.','',$code);
$code = strtolower($code);
if (preg_match("/[^\da-z]+/", $code)) exit();
elseif(strlen($code)<2)exit();
elseif(file_exists('./captcha/'.$code))
{
unlink('./captcha/'.$code);
}
/* YOU CAN MODIFY THE IMAGE CODE FROM HERE TO CREATE MORE COOL CAPTCHA IMAGES, eg. with different backgrounds */
header("Content-type: image/gif");
$im = @imagecreate(1, 1)
or die("Cannot Initialize new GD image stream");
$background_color = imagecolorallocate($im, 0, 0, 0);
imagegif($im);
imagedestroy($im);
?>