php image script works, but would like to improve.?

  • Thread starter Thread starter p4rdner
  • Start date Start date
P

p4rdner

Guest
I have a php script that changes the header type to an image:
header("Content-type: image/png");

The script ends with:
imagepng($this->img);

The png image is being displayed perfectly and is working exactly as it should. If I want use this image on a html webpage I use <img src="my_script.php"> and that works fine too.

The problem is if I want to use this image on say a php BB web forum that does not allow html code and restricts the image extension to your standard extenstion. So for example, the php BB code to display an image is: . But,
does not work.

My question, is there a way to have my php script output an image of maybe alias my script to have an image extension?
 
Back
Top