/home/mjc1/public_html/html/gdSec.php


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
27
28
29
<?
 header
("content-type:image/gif");

 
$im ImageCreate(150,50);
 
 
$white imagecolorallocate($im,255,255,255);
 
$bg imagecolorallocate($im,200,200,200);
 
$black imagecolorallocate($im,0,0,0);

 
$num rand(0,5);
 
$width 150;
 
$height 50;

 for (
$i=$num$i<=$width$i+=10)
 
imageline($im,$i,0,$i,$height,$bg);

 for (
$i=$num$i<=$height+10$i+=10)
 
imageline($im,0,$i,$width,$i,$bg);

 
$string $_COOKIE["gd-image"];

 
$start_x 75 - ( strlen($string) * ImageFontWidth(20) /);
 
$start_y 25 -ImageFontHeight(20)/2;
        
 
ImageString($im,20,$start_x ,$start_y ,$string$black );
 
 
ImageGif($im);
 
ImageDestory($im); 
?>