Jump to content
GIGN Forum

Auto Kodu Rakstitajs ?


Narkotika.
 Share

Recommended Posts

PHP

<?

  session_start

();

  

$font=$_SERVER['DOCUMENT_ROOT']."/fonts/impact.ttf";

  

$image=imagecreatefromjpeg($_SERVER['DOCUMENT_ROOT']."/images/background.jpg");

  

$code=rand(10000,99999);

  

$_SESSION['code']=$code;

  

$tmp=imagecreatetruecolor(119,31);

  

$color=imagecolorallocate($tmp,255,0,0);

  

imagettftext($image,18,10,25,30,$color,$font,$code);

  

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

  

imagepng($image);

  

imagedestroy($image);

?>

Link to comment
Share on other sites

PHP

<?

  session_start

();

  

$font=$_SERVER['DOCUMENT_ROOT']."/fonts/impact.ttf";

  

$image=imagecreatefromjpeg($_SERVER['DOCUMENT_ROOT']."/images/background.jpg");

  

$code=rand(10000,99999);

  

$_SESSION['code']=$code;

  

$tmp=imagecreatetruecolor(119,31);

  

$color=imagecolorallocate($tmp,255,0,0);

  

imagettftext($image,18,10,25,30,$color,$font,$code);

  

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

  

imagepng($image);

  

imagedestroy($image);

?>

kr un ka shitas jaliek ?

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...