<HTML><BODY>
This PHP script demonstrates the use of the php_gd module<br>
<?php echo "Today is ", date("F j, Y, g:i a"), "<br>\n"; ?>
<?php echo "PHP_VERISON ", PHP_VERSION, "<br>\n"; ?>

<br>In this example we load the gd extension dynamically<br>
<br>For normal use edit the php.ini file and uncomment the 
'extension=php_gd.dll' line<br><br>


<?
	// gd_libary example, uses php_gd.dll

    if (!extension_loaded('gd')) {
        dl('php_gd2.dll');
    }

	$Jpeg = ImageCreate(120,16);
	$bg = ImageColorAllocate($Jpeg,100,150,200);
	$tx = ImageColorAllocate($Jpeg,250,250,250); 
	ImageFilledRectangle($Jpeg,0,0,3,3,$bg); 
	ImageString($Jpeg,2,1,1,"GENERATED BY GD" ,$tx);
    $tempfile = str_replace('\\', '/', $_ENV[TEMP]) . "/test.jpg";

    $tempfile = $_ENV[TEMP] . "\\test.jpg";
    $tempfile = str_replace("\\\\", "\\", $tempfile);
	ImageJpeg($Jpeg, $tempfile,100);

    print "<img src=\"$tempfile\"> <br>";

?>

</BODY></HTML>
