Click to See Complete Forum and Search --> : dynamic images mixed with normal HTML??


mitya
11-06-2003, 11:27 AM
Hi all

How can I integrate image output scripts inside normal multi-type content pages? That is, I have text and normal content on the page, but further down require PHP to make some images. To do this you need the header("content-type: image/png"); header, but my content ISN'T just image, it's HTML too.

To word a difficult question in its most basic form: how do I use image functions AND have normal HTML output?

Thanks in advance.

PunkSktBrdr01
11-06-2003, 11:39 AM
In my experience, you need to have a separate file for the image generation and use <img src="image.php">. I've never seen another way to do it.

mitya
11-06-2003, 02:34 PM
Yeah that's what I feared :( Thanks anyway.

DaiWelsh
11-11-2003, 11:32 AM
You can generate the images on disk as you go along and deliver the page with <img> tags pointing to the (now static) versions, but it depends why you want it to be one script whether this helps you. If you need it to be done in one pass for coding reasons this will work (give the images some form of unique name then tidy them later if needed), if you have some more obscure reason for wanting it to all be one call then it might not...?

mitya
11-11-2003, 07:59 PM
THanks for that DaiWelsh.

Fancy meeting someone not 30 miles away on this internetional forum...