View file a.php

File size: 888B
<?php
session_start();
$_SESSION['pswd1']=rand(1,9);
$_SESSION['pswd2']=rand(1,9);
$_SESSION['pswd3']=rand(1,9);
$_SESSION['pswd4']=rand(1,9);
$im = ImageCreateFromPNG('img/kod.png');

$pos1 = 1;
$black1 = ImagecolorAllocate($im,0,0,0);

$pos2 = 6;
$black2 = ImagecolorAllocate($im,0,0,0);

$pos3 = 3;
$black3 = ImagecolorAllocate($im,0,0,0);
$pos4 = 7;
$black4 = ImagecolorAllocate($im,0,0,0);


Imagestring($im,10,4,$pos1,"".$_SESSION['pswd1']."",$black1);
Imagestring($im,10,17,$pos2,"".$_SESSION['pswd2']."",$black2);
Imagestring($im,10,31,$pos3,"".$_SESSION['pswd3']."",$black3);
Imagestring($im,10,45,$pos4,"".$_SESSION['pswd4']."",$black4);

header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
header("Content-type: image/png");
ImagePng($im);
?>