Problem: Headers: Content Type
Posted 05 March 2006 - 10:01 PM
I'm not sure if this is a newb question, but just to be safe, I'm posting it here:
I'm currently setting up a site which a php news posting script that reads from mySQL database. Thus, when I'm loading the main page, it's reading html/text data from the database and displaying it on the main page.
I've also found a nifty PHP/GD script that dynamically adds watermarks to pictures and displays them automatically. However, this script requires a header to be sent initially that tells the browser to expect image/jpeg format. When I run this php script alone, the picture loads fine (with the new watermark).
However, my problem is that I want to display this picture on the main page, along with the news posts. So, I have two conflicting data types (I think?). When I use this jpeg/html header, the main site only displays the URL (as a jpeg format). If I take out the header (implied to default html/text), then the main page loads fine, except the picture is now being displayed in text (elsfkjselfj#$LJL$JTLJLJ, etc..).
Is there a solution to this problem, or is it impossible to be able to display multiple content types ? If not, can you think of any other possible solutions?
Posted 05 March 2006 - 11:14 PM
Posted 06 March 2006 - 01:30 AM
Without seeing any code, the probable solution is to use your image creation script as is (i.e. with the correct header type) and call it from the page display script via <img src="myscript.php">
Great! I took what you said and tried it and it worked out perfectly! Thanks so much for your help!
Take a look here: [a href=\"http://phire.x3fusion.com/v4/\" target=\"_blank\"]http://phire.x3fusion.com/v4/[/a]
However, when looking at the source, the src right now is watermark.php?imageToMark=bmw_thumb...is there a way for it just to display bmw_thumb.jpg so that users won't know that its a just a script......
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users