Файл: X-MAN/upload/code.php
Строк: 27
<?
session_start();
$r1 = rand()%9+1;
$r2 = rand()%9+1;
$r3 = rand()%9+1;
$r4 = rand()%9+1;
$r5 = rand()%9+1;
$r6 = rand()%9+1;
$key = "hGqb381";
$_SESSION['code'] = md5($r1.$r2.$r3.$r4.$r5.$r6.$key);
$font = "fonts/Century.TTF";
header('Content-Type: image/png');
$image = imagecreatetruecolor(105,40);
$color = imagecolorallocate ( $image , 123 , 123 , 233 );
imagettftext ($image , 18 , -20+rand()%35+1 , 7 , 30 , $color , $font, $r1 );
imagettftext ($image , 18 , 15-rand()%30+1 , 22 , 30 , $color , $font, $r2 );
imagettftext ($image , 18 , -9+rand()%21+1 , 38 , 30 , $color , $font, $r3 );
imagettftext ($image , 18 , 8-rand()%30+1 , 53 , 30 , $color , $font, $r4 );
imagettftext ($image , 18 , 8-rand()%30+1 , 67 , 30 , $color , $font, $r5 );
imagettftext ($image , 18 , 8-rand()%30+1 , 83 , 30 , $color , $font, $r6 );
imagepng($image);
imagedestroy($image);
?>