Reacties op: "Werkende img.php voor vendetta"
1
Berichten: 552
Kan je tussen code tags zetten ?
24-08-2010 00:11
Maffiabullet
Berichten: 11
hoe
24-08-2010 20:02
Berichten: 470
Code | Selecteer Alles
minimaliseren
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<?php
session_start
();
$width      100;
$height     =  40;
$len        =  3;
$fontsize   =  15;
$keys "abcdefghijklmnopqrstuvwxyz0123456789";
unset(
$random_text);
$lchar 0;
$char  0;
$max=strlen($keys)-1;
for (
$i=0;$i $len;$i++) {
$random_text .= substr($keysrand(0$max), 1);
}
$fontwidth  ImageFontWidth($fontsize) * strlen($random_text);
$fontheight ImageFontHeight($fontsize);
$im = @imagecreate($width,$height);
$background_colour imagecolorallocate($imrand(0,255), rand(0,100), rand(0,100));
$text_colour imagecolorallocate($imrand(150,255), rand(150,255), rand(150,255)); 
imagerectangle($im00$width-1$height-1$text_colour);
imagestring($im$fontsizerand(3$width-$fontwidth-3), rand(2$height-$fontheight-3), $random_text$text_colour);
header("Content-type: image/png");
imagepng($im,'',80);
imagedestroy($im);
$_SESSION["verify"] = $random_text;
?>
30-08-2010 15:40