Click to See Complete Forum and Search --> : im not sure how to give a title to this


zaryk
May 4th, 2008, 07:30 PM
so ill explain.........i have a variable


$picture = "/$registered/$member/$pic/default.jpg";


i want to be able to have


$registered
$member
$pic


to be equal to an md5 or something, that is, if u look at the source code, but still shows the picture....or more or less still equal to the path to the picture. any ideas ...thanks?

PeejAvery
May 4th, 2008, 10:47 PM
It seems that you are attempting to hide the path of an image. Is this the case?

You can use whatever you want in PHP to output a path to an image. However, once it is in HTML, it will have to be the actual location of the image.

If you are trying to mask the path, you can use a PHP file to read the image and then echo it. The following will show the file name, but the user will see the path to the PHP file and not the true image path.

<?php
header('Content-type: image/jpeg');
echo file_get_contents('path/to/file/' . $_GET['image']);
?>

If I misunderstood your complete intention, please explain yourself a little more clearly.

zaryk
May 5th, 2008, 03:29 PM
cool thanks....thats exactly what i was looking for.