Log in

View Full Version : Several "headers"



jovovich
10-13-2008, 07:39 PM
Found the solution with: "if (isset($_GET['im']))"

----------------------------------------------------------------------
I've read FAQ and tried several things, but can not get this to work ...

How get I use several e.g. GD 2 scripts at the same page? like this:

<?php
$im = imagecreatetruecolor(120, 20);
$text_color = imagecolorallocate($im, 233, 14, 91);
imagestring($im, 1, 5, 5, 'test1', $text_color);
header('Content-type: image/jpeg');
imagejpeg($im, NULL, 75);
imagedestroy($im);

$im = imagecreatetruecolor(120, 20);
$text_color = imagecolorallocate($im, 233, 14, 91);
imagestring($im, 1, 5, 5, 'test2', $text_color);
header('Content-type: image/jpeg');
imagejpeg($im, NULL, 75);
imagedestroy($im);
?>

I'm new at PHP, jumping right from ASP ...

rgrds,