Final question I hope!!!
The following code works, but it makes the browser directly open the image. How do I make it so I can call this image from inside another HTML page?
<?php
// 200 is width / 30 is height
$TheImage = Imagecreate("75", "25");
// We want to color the image Blue..
// We use 0x before the HEX value so you can use the hex value..
// If you do not use 0x then you must give in a 0-255 value for the color.
$ColorImage = imagecolorallocate($TheImage, 180, 50, 23);
// Color the text...
$ColorText = imagecolorallocate($TheImage, 0, 0, 0);
$ColorLine = imagecolorallocate($TheImage, 75, 75, 75);
// printing the text:
// $TheImage is so it prints on that image.
// 14 is how large the font is
// 0 is the rotation (add and the right side will tip up)
// 15 is how far it is from the left side of the image
// 20 is how far it is from the top of the image
// $ColorText gives the text its color
// Verdana is the font it uses
// Some sample text is the text is prints...
$secret = substr(md5(uniqid(rand())), 0, 5);
$secret = strtoupper($secret);
imageline($TheImage, 75, 8, 0, 15, $ColorLine);
ImageTTFText($TheImage, 12, -5, 16, 20, $ColorText, "times.ttf", $secret);
// Let the browser know that it is an image..
header("Content-Type: image/PNG");
// We want to show the image (in png format...)
ImagePng ($TheImage);
?>