Server : Apache System : Linux profile 3.10.0-1160.88.1.el7.x86_64 #1 SMP Tue Mar 7 15:41:52 UTC 2023 x86_64 User : apache ( 48) PHP Version : 8.0.28 Disable Function : NONE Directory : /var/www/html/venkat/blockchain-2019/ |
<?php
ini_set('session.cookie_httponly', 1);
ini_set('session.use_only_cookies', 1);
ini_set('session.cookie_secure', 1);
ini_set('session.gc_maxlifetime', 180);
session_set_cookie_params(180);
$str = substr(str_shuffle("$#@ABCDEFGHIJKLMNPZWS0123456789UVMNPQRSANNAUNIV"),0,7);
//$text = rand(1000000,99999999);
//$text = $text.$str;
$text = $text.$str;
session_start();
$_SESSION["vercode"] = $text;
$height = 19;
$width = 72;
$image_p = imagecreate($width, $height);
$black = imagecolorallocate($image_p, 0, 0, 0);
$white = imagecolorallocate($image_p, 220, 220, 220);
$font_size = 4;
imagestring($image_p, $font_size, 5, 5, $text, $white);
imageline($image_p, 0, 0, 165, 65, $grey);
imagejpeg($image_p, null, 60);
?>