1
What I'm attempting to do is use the php imagestring functions. Below is a simplified version of the code I'd like to use but I can't get it to render in a custom block (even with content type set to PHP Script).
$im = @imagecreate(120, 30);
$background_color = imagecolorallocate($im, 255, 255, 255);
$text_color = imagecolorallocate($im, 0, 0, 153);
imagestring($im, 1, 5, 5, "A Simple Text String", $text_color);
if (function_exists("imagegif")) {
header("Content-type: image/gif");
imagegif($im);
imagedestroy($im);
} else {
die("No image support in this PHP server");
}
This code renders fine outside of XOOPS but it won't display inside a custom block... It looks like the output is converted to ASCII text - any ideas?