phirewerkz Posted March 5, 2006 Share Posted March 5, 2006 Hello there,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?Many thanks,phirewerkz Quote Link to comment Share on other sites More sharing options...
AndyB Posted March 5, 2006 Share Posted March 5, 2006 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"> Quote Link to comment Share on other sites More sharing options...
phirewerkz Posted March 6, 2006 Author Share Posted March 6, 2006 [!--quoteo(post=351924:date=Mar 5 2006, 06:14 PM:name=AndyB)--][div class=\'quotetop\']QUOTE(AndyB @ Mar 5 2006, 06:14 PM) [snapback]351924[/snapback][/div][div class=\'quotemain\'][!--quotec--]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">[/quote]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......Cheers!phirewerkz Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.