This commit is contained in:
Alan
2026-02-14 19:34:54 +03:00
commit 5c3329238b
867 changed files with 214778 additions and 0 deletions

BIN
captcha/blank.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

48
captcha/image.php Normal file
View File

@@ -0,0 +1,48 @@
<?php
header("Content-type: image/jpeg");
session_start();
// image config
$code = rand(1000,9999);
$color_r = rand(50, 170);
$color_g = rand(50, 170);
$color_b = rand(170, 250);
$_SESSION["captcha_code"] = $code;
$bg_image = "blank.jpg";
$font = "./maturasc.ttf";
$size = 26;
$rotation = rand(-5,10);
$pad_x = 10;
$pad_y = 35;
// generate image
$img_path = $bg_image;
$img_size = getimagesize($img_path);
$width = $img_size[0];
$height = $img_size[1];
$img = ImageCreateFromJpeg($img_path);
$fg = ImageColorAllocate($img, $color_r, $color_g, $color_b);
ImageTTFText($img, $size, $rotation, $pad_x, $pad_y, $fg, $font, $code);
$dots = $width*$height/2;
for($i=0;$i<$dots;$i++)
{
$dc = ImageColorAllocate($img, $color_r, $color_g, $color_b);
ImageSetPixel($img, rand(0,$width), rand(0,$height), $dc);
}
imagejpeg($img);
?>

0
captcha/index.html Normal file
View File

BIN
captcha/maturasc.ttf Normal file

Binary file not shown.