Файл: code.php
Строк: 14
<?php
###############################################
# by MaZaFaKa #
# ICQ: 449-559 #
# E-mail: Dimonnet@inbox.ru #
# Потраченное время: Около 2х недель #
###############################################
define("ROOTPATH", getcwd());
define("TMP", ROOTPATH."/tmp/code/");
if(!is_file(TMP.$_SERVER['QUERY_STRING']))
{
$code = '----';
}
else
{
$code = (int) file_get_contents(TMP.$_SERVER['QUERY_STRING']);
}
$x = 40;
$y = 20;
$image = imagecreatetruecolor($x, $y);
$black = imagecolorallocate($image, 192, 192, 192);
$white = imagecolorallocate($image, 89, 89, 89);
imagefill($image, 0, 0, $black);
imageString($image, 5, 3, 2, $code, $white);
imagefilter($image, IMG_FILTER_MEAN_REMOVAL/*IMG_FILTER_EMBOSS*/);
header("Content-type: ".image_type_to_mime_type(IMAGETYPE_GIF));
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
header("Cache-Control: no-cache, must-relative");
imagegif($image);
imagedestroy($image);
?>