Файл: region_clean/reg/img.php
Строк: 52
<?php
#######################################
## Mod By KoT (borispol) [76-75-072] ##
#######################################
session_start();
Header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
Header("Cache-Control: no-cache, must-revalidate");
Header("Pragma: no-cache");
Header("Last-Modified: " . gmdate("D, d M Y H:i:s") . "GMT");
$word = intval($_SESSION['reg_cod']);
$word = "$word";
$img = ImageCreateFromPng('img.png');
$sz = GetImageSize('img.png');
$size = 14; //размер шрифта
$font = 'comic.ttf'; //шрифт
for($i = 0;$i < 4;$i++) {
$rndX = mt_rand(0, $sz[0]);
$rndX1 = mt_rand(0, $sz[0]);
$rndY = mt_rand(0, $sz[1]);
$rndY1 = mt_rand(0, $sz[1]);
$rndX2 = mt_rand(0, $sz[0]);
$rndX3 = mt_rand(0, $sz[0]);
$rndY2 = mt_rand(0, $sz[1]);
$rndY3 = mt_rand(0, $sz[1]);
$color = mt_rand(1000, 9999999); //случайный цвет
#imageLine($img, $rndX, $rndY, $rndX1, $rndY1, $color);
#imageLine($img, $rndX2, $rndY2, $rndX3, $rndY3, $color);
}
for($i = 0;$i < 4;$i++) {
$angle = mt_rand (-20, 20); //угол поворота
if ($i == 0)$x = 5;
else $x = $x + 12; //смещение по горизонтали
$y = 18; //смещение по вертикали
$color = mt_rand(1000, 9999999);
ImageTTFtext($img, $size, $angle, $x, $y, $color, $font, $word[$i]);
}
#imageFilledRectangle($img, 0, 0, $sz[0], 2, 1);
#imageFilledRectangle($img, $sz[0]-3, 0, $sz[0], $sz[1], 1);
#imageFilledRectangle($img, 0, $sz[1]-3, $sz[0], $sz[1], 1);
#imageFilledRectangle($img, 0, 0, 2, $sz[1], 1);
$im = imagecreatetruecolor(50, 20);
imagecopyresampled($im, $img, 0, 0, 0, 0, $newwidth, $newheight, $width, $height);
header("Content-type: image/png");
imagegif($img);
?>