I want to show the image as a url to protect it, for example:
Instead of showing <img src="http://www.website.com/image/image.jpg" width="229" height="152" />
I want to show the image url
image.php?id=1542
Take a look at these PHP functions to make a php script that reads and outputs and image:
imagecreatefromjpeg()
function.imagecreatefromjpeg.php
imagejpeg()
function.imagejpeg.php
Your PHP page would essentially read in the existing JPG file, then would output it from the PHP script. Something like this would work:
$im = imagecreatefromjpeg('image.jpg');
header('Content-type: image/jpeg');
imagejpeg($im);
imagedestroy($im);
This assumes image.jpg is in the same directory as the PHP script, but really it could be anywhere and you can just adjust that path accordingly. You can also do some cool things like check to make sure the image is being requested from your server (to prevent outside sites from linking to it directly), add watermarks, etc from within this PHP script.
-justin