[BlueOnyx:19876] Re: GD image problem

fastreplies fastreplies at shaw.ca
Sun Jul 24 16:49:04 -05 2016


Hi,

---------------------------------

<?php
$circles=6;
$width=80;
$height=25;
$font=10;
if ($_REQUEST['randcode']) {
$string = base64_decode($_REQUEST['randcode']);
} else {
$randcode = mt_rand(100000, 999999);
$string = $randcode;
}
$fontwidth = ImageFontWidth($font) * strlen($string);
$fontheight = ImageFontHeight($font);
$im = @imagecreate ($width,$height);
$background_color = imagecolorallocate ($im, 255, 255, 255);
$text_color = imagecolorallocate ($im, rand(0,100), rand(0,100),
rand(0,100)); // Random Text
for ($i=1;$i<=$circles;$i++) {
$randomcolor = imagecolorallocate ($im , rand(100,255),
rand(100,255),rand(100,255));
imagefilledellipse($im,rand(0,$width-10),rand(0,$height-3),
rand(20,70),rand(20,70),$randomcolor);
}
imagerectangle($im,0,0,$width-1,$height-1,$text_color);
imagestring ($im, $font, rand(3, $width-$fontwidth-3),
rand(2,$height-$fontheight-3), $string, $text_color);
header ("Content-type: image/jpeg");
imagejpeg ($im,'',80);
?>
--------------------------

Please keep in mind that we have using a copy of the same script in others 
sites and servers, which just stop working

Cheers
Bart


----- Original Message ----- 
From: "Michael Stauber" <mstauber at blueonyx.it>
To: "BlueOnyx General Mailing List" <blueonyx at mail.blueonyx.it>
Sent: Sunday, July 24, 2016 4:37 PM
Subject: [BlueOnyx:19874] Re: GD image problem


> Hi Bart,
>
>> <img src="gd.php?randcode=<?php echo $randcodesec; ?>" alt="Security 
>> Code"
>
> So the actual image is created by calling the script gd.php with the URL
> parameter "?randcode=<code>".
>
> Could you please post the code of gd.php? That might shed some light at
> what it does how.
>
> -- 
> With best regards
>
> Michael Stauber
> _______________________________________________
> Blueonyx mailing list
> Blueonyx at mail.blueonyx.it
> http://mail.blueonyx.it/mailman/listinfo/blueonyx 





More information about the Blueonyx mailing list