Вход Регистрация
Файл: fo/pic.php
Строк: 42
<?php
$font 
'includes/font.ttf';

session_id($_SERVER['QUERY_STRING']);
session_start();
$vercode mt_rand(1000,10000);
$_SESSION['ref'] = $vercode;
header('Content-type: image/gif');

$img imagecreatefromgif('images/codebg.gif');

imagecolorallocate($img255255255);
$imgcolor imagecolorallocate($img000);

imagettftext($imgmt_rand(1819), mt_rand(-1010), mt_rand(010), mt_rand(1132), $imgcolor$fontsubstr($vercode01));
imagettftext($imgmt_rand(1819), mt_rand(-1010), mt_rand(2025), mt_rand(1132), $imgcolor$fontsubstr($vercode11));
imagettftext($imgmt_rand(1819), mt_rand(-1010), mt_rand(3540), mt_rand(1132), $imgcolor$fontsubstr($vercode21));
imagettftext($imgmt_rand(1819), mt_rand(-1010), mt_rand(5055), mt_rand(1132), $imgcolor$fontsubstr($vercode31));

$imgpx mt_rand(150,200);
while(
$imgpx 0){
imagesetpixel($imgmt_rand(075), mt_rand(0,35), $imgcolor);
$imgpx--;
}
/*
$imglns = mt_rand(4,5);
while($imglns > 0){
imageline($img, mt_rand(0, 35), mt_rand(0,17), mt_rand(35, 70),  mt_rand(17, 35),  $imgcolor);
$imglns--;
}
*/
//Фильтр, включите, если у вас GD версии 2
//imagefilter($img, IMG_FILTER_SMOOTH, mt_rand(10, 12));

imagegif($img);
?>
Онлайн: 0
Реклама