Argh ...
Hi folks, having what appears to be the usual newbie header() problem.
Here's a sample of what's not working:
test.php:
header("Content-type: image/png");
header("Content-type: text/html", false);
echo "some text<p>";
include "drawshirt.php";
echo "<P>some more text<P>";
the drawshirt.php looks like this:
$im = @imagecreatefrompng('images/strip.png')
or die("Cannot open image file");
#SET TRANSPARENCY
imagesavealpha($im, true);
$trans_colour = imagecolorallocatealpha($im, 0, 0, 0, 127);
imagefill($im, 0, 0, $trans_colour);
$shirt_r=255; $shirt_g=0; $shirt_b=0;
$short_r=0; $short_g=255; $short_b=0;
$socks_r=0; $socks_g=0; $socks_b=255;
$shirt=imagecolorallocate($im, $shirt_r, $shirt_g, $shirt_b);
$short=imagecolorallocate($im, $short_r, $short_g, $short_b);
$socks=imagecolorallocate($im, $socks_r, $socks_g, $socks_b);
#FILL SHIRT
imagefilltoborder($im, 11, 5, $black, $shirt);
imagefilltoborder($im, 9, 15, $black, $short);
imagefilltoborder($im, 9, 21, $black, $socks);
imagefilltoborder($im, 14, 21, $black, $socks);
imagepng($im);
imagedestroy($im);
What appears in the browser when displaying test.php is the two lines of text separated by a string of garbage ...
What am I doing wrong?