| Server IP : 208.122.213.31 / Your IP : 216.73.216.185 Web Server : Apache System : Linux msd6191.mjhst.com 4.18.0-553.137.1.el8_10.x86_64 #1 SMP Wed Jun 24 11:40:24 UTC 2026 x86_64 User : WHMCS_MIA_382 ( 1001) PHP Version : 7.4.33 Disable Function : NONE MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /home/httpd/html/www.superporner.com/tube/ |
Upload File : |
<?php
// save this code in your random script
error_reporting(-1);
ini_set('error_reporting', E_ALL);
session_start();
$length = 0;
for ($i = 0; $i < 6; $i++) {
// this numbers refer to numbers of the ascii table (small-caps)
$str .= chr(rand(97, 122));
}
$_SESSION['captcha'] = $str;
$imgX = 180;
$imgY = 60;
$image = imagecreatetruecolor(180, 60);
$backgr_col = imagecolorallocate($image, 238,239,239);
$border_col = imagecolorallocate($image, 208,208,208);
$text_col = imagecolorallocate($image, 60,60,60);
$noise_color = imagecolorallocate($image, 80, 80, 80);
imagefilledrectangle($image, 0, 0, 180, 60, $backgr_col);
imagerectangle($image, 0, 0, 179, 59, $border_col);
for( $i=0; $i<($imgX*$imgY)/3; $i++ ) {
imagefilledellipse($image, mt_rand(0,$imgX), mt_rand(0,$imgY), 1, 1, $noise_color);
}
$font = "./actionj.ttf"; // it's a Bitstream font check www.gnome.org for more
$font_size = 30;
$angle = 0;
//phpinfo();
//echo "<pre>". print_r(gd_info(), true) ."</pre>";
//echo "1<Br>";
$box = imagettfbbox($font_size, $angle, $font, $_SESSION['captcha']);
//echo "1.5<br>";
$x = (int)($imgX - $box[4]) / 2;
$y = (int)($imgY - $box[5]) / 2;
imagettftext($image, $font_size, $angle, $x, $y, $text_col, $font, $_SESSION['captcha']);
//echo "2<br>";
header("Content-type: image/png");
imagepng($image);
imagedestroy ($image);
?>