Header / Image (gdlib) Problem
| From: | (Bryan Forstner) | Date: | Fri, 08 Sep 2000 04:21:14 +0000 |
| Subject: | Header / Image (gdlib) Problem | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-15822@lists.php.net to get a copy of this message | ||
Hello everyone,
I have a small problem with the header function. I found some
scripting to use as an example to produce dynamic graphics on a page. The
programming is working great, except I can't seem to get anything else to
load into the browser.
After I send the header command (as shown below), none of the
other HTML code is being passed to the browser. How do I set up the image
file and send that graphic to the middle of the HTML code?
-----------
<?PHP
Header("Content-type: image/gif");
$graphic = "./graphics/header/logo.gif";
$img_info = getimagesize($graphic);
$img = imagecreatefromgif($graphic);
$blue = ImageColorAllocate($img, 0, 0, 128);
$black = ImageColorAllocate($img, 0, 0, 0);
$shadow = ImageColorAllocate($img, 255, 128, 0);
$white = ImageColorAllocate($img, 255,255,255);
// ImageFill($img, 1, 1, $white);
$logo1 = ImageTTFText($img, 28, 0, 97, 47, $white, "./font/SCRIPTBL.TTF",
"Welcome to Your new Web site");
$logo2 = ImageTTFText($img, 28, 0, 95, 45, $blue, "./font/SCRIPTBL.TTF",
"Welcome to Your new Web site");
imagegif($img);
ImageDestroy($img);
?>
<html>
<head>
<title>page title</title>
...
-----------
Bryan