Forum Moderators: coopster
Following, I tried to do a script that hide for image URL ( image.php?img=001 ) where 001 is the iD corresponding to image on the data base.
I did that script:
<?php
include("config.php");
$img = $_GET["img"];
$query = mysql_query("SELECT * FROM files WHERE id='$img'") or die(mysql_error());
$x = mysql_fetch_array($query);
$id = $x["id"];
$photo = $x["photo"];
$file = fopen ("$photo", "rb", 1);
$data = fread($file, filesize("$photo"));
fclose ($file);
Print($data);
?>
So, I catch this image with <img src="image.php?img=001">
But if the guy click with the right button of the mouse on top of the image and to click in properties will see the link [localhost...] ( I am exhibiting the files of my computer ) if the guy put for URL in the navigator, it is going to appear a lot of Crunched codes.
I wanted if it put [localhost...] was exhibited the image, and not these codes.
Will it it be what anybody could help?
Thanks again.
You may also want to look at this library thread [webmasterworld.com] that discusses in-depth methods that use Apache mod_rewrite.