Просмотр файла captcha.php

Размер файла: 1.99Kb
<?php
#############################################
# 0JXRgdC70Lgg0YLRiyDRh9C40YLQsNC10YjRjCDRj #
# dGC0L4g0YHQvtC+0LHRidC10L3QuNC1LCDQt9C90L #
# DRh9C40YIg0YLRiyDQvdC10LzQvdC+0LPQviDQt9C #
#          90LDQtdGI0YwgUEhQIQ==            #
#__---------------------------------------__#
#__        0JrQu9C40Log0JrQu9GD0LE=       __#
#  ---------------------------------------  #
# 0JDQstGC0L7RgCA6IE1vcmdhbg==              #
# SUNRIDog0L3QtSDRgdC60LDQttGDIHhE          #
#                                           #
#############################################

#$off_hh = 'yes';

require 'inc/start.php';
require 'inc/regvars.php';
require 'inc/db.php';
require 'inc/config.php';
require 'inc/funct.php';
require 'inc/antidos.php';
require 'inc/gzip.php';
#require '../inc/header.php';



$captcha = imagecreatetruecolor(41,21);

// Цвета
$cl_f = imagecolorallocate($captcha,rand(230,255),rand(230,255),rand(230,255));
$cl_s = imagecolorallocate($captcha,rand(200,220),rand(200,220),rand(200,220));
$cl_t = imagecolorallocate($captcha,rand(0,100),rand(0,100),rand(0,100));
$cl_l = imagecolorallocate($captcha,64,64,64);
#$cl = imagecolorallocate($captcha,,,);

// Фон
imagefill($captcha,0,0,$cl_f);

// Рисуем сетку
for ($i=0;$i<=60;$i+=5) imageline($captcha,$i,0,$i,25,$cl_s);
for ($i=0;$i<=25;$i+=5) imageline($captcha,0,$i,100,$i,$cl_s);


$symbols = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';
$_SESSION['code'] = '';
 for($i=0;$i<=3;$i++)
{
$_SESSION['code'] .= $symbols[rand(0,61)];
}


header('Content-type: image/jpeg');

// Рисуем текст
imagettftext($captcha, 12, rand(-2,2), 5, 15, $cl_t, 'inc/ARIAC.ttf', $_SESSION['code']);

// Показываем
imagejpeg($captcha,null,75);
imagedestroy($captcha);

exit;

################################################
# 0KHQutGA0LjQv9GCINC90LUg0L/QsNCx0LvQuNC6IQ== #
#   0KHRgtCw0LLRgNC+0L/QvtC70YwsIDIwMDkg0LMu   #
################################################

?>