C
Cat 22
I have a php script that generates an image to stdout, i can redirect the
script to a file and load the file and thats ok, but what iwant to do is
something like this
<html>
<body>
<h1>It sorta works!</h1>
<img src="<?php tach.php?p=30 ?>" width=200 height=200 alt="tach">
</body>
</html>
The trouble is get only the image placeholder and the alt text but
no image.
tach.php has a content header and looks like this (some code dropped to
just show relevant stuff, I already am sure its creating an image)
<?php
header("Content-type: image/png");
$img=imagecreate(200,200);
[snip other stuff that makes the image]
imagepng($img);
imagedestroy($img);
?>
I'm using lighttpd and testing this on my local machine, i have phpsysinfo
installed and lighttpd handles that ok, so I think php itself is fine
also, "php-fastcgi -f tach.php" doesnt show any errors
I'm doing all this in linux.
My goal is to run a script that uploads weather info to my website every 5
minutes or so and the page would dynamically create the images for the
various instruments each time its loaded (or reloaded).
Thanks
Cat22
script to a file and load the file and thats ok, but what iwant to do is
something like this
<html>
<body>
<h1>It sorta works!</h1>
<img src="<?php tach.php?p=30 ?>" width=200 height=200 alt="tach">
</body>
</html>
The trouble is get only the image placeholder and the alt text but
no image.
tach.php has a content header and looks like this (some code dropped to
just show relevant stuff, I already am sure its creating an image)
<?php
header("Content-type: image/png");
$img=imagecreate(200,200);
[snip other stuff that makes the image]
imagepng($img);
imagedestroy($img);
?>
I'm using lighttpd and testing this on my local machine, i have phpsysinfo
installed and lighttpd handles that ok, so I think php itself is fine
also, "php-fastcgi -f tach.php" doesnt show any errors
I'm doing all this in linux.
My goal is to run a script that uploads weather info to my website every 5
minutes or so and the page would dynamically create the images for the
various instruments each time its loaded (or reloaded).
Thanks
Cat22