john_6767 Posted September 15, 2006 Share Posted September 15, 2006 ok, i have what i think is a simple question, excuse my primative php knowledge, lease let me know if i have stated things that don't seem to make sense so i can learn!how do i display my images i made with gd library page in a normal php page? i can display them as a php page themselves, but how do i include the php image (its a page that makes an image..) into one of my normal php pages.. do i use includes?I am doing this so that people cannot see my uploaded images, instead they see my gd library generated image that is the normal image with a watermark over the top..also what can i do to stop people from viewing my uploaded image directly (hence the image without a watermark)?cheers Quote Link to comment Share on other sites More sharing options...
michaellunsford Posted September 15, 2006 Share Posted September 15, 2006 you just need to use the standard <img src="image.php"> tag on your "plain" php page. as far as I know, you can't "include" actual jpeg data on an HTML page -- although you can attach it to an HTML email.How do you keep them from seeing your original? keep it in a weird directory someplace else and have the PHP open it from there. Really paranoid? put it in a directory outside your site's root directory and revise your open_basedir to include it... for example... your site is on the server at /var/www/example.com/httpdocs -- you could put your images in the /var/www/example.com/secretimagesfolder. Nobody should be able to get to it with a standard web browser, but you would likely get open_basedir errors if you didn't update that setting. Quote Link to comment Share on other sites More sharing options...
john_6767 Posted September 16, 2006 Author Share Posted September 16, 2006 cheers! 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.