The "Freeola Customer Forum" forum, which includes Retro Game Reviews, has been archived and is now read-only. You cannot post here or create a new thread or review on this forum.
Let me explain better.
I don't want this:
http://www.mydomain.com/images/hidden_image.gif
But I want this:

Is it an HTDOCS trick? Can I hide some of the characters from display in the source?
Cheers, mankey_mon
All you need is something like ...
$data="";
$fp = fopen("$image_file", "rb");
while(!feof($fp))
{
$data .= fread($fp, 1024);
}
fclose($fp);
header("content-type: image/jpeg");
print $data;
?>
..or something like that.
You only need GD if you intend to alter the image, eg add a water mark.
monkey_man wrote:
> What I'm trying to achieve is a series of images, some private, some
> public, where a user wouldn't be able to simply type the path to the
> image in the browser. I'll have another look at the GD stuff on
> PHP.net again.
The 2nd link I provided you below showed you exactly what you wanted, obviously you don't want to read it though. ;)
What I'm trying to achieve is a series of images, some private, some public, where a user wouldn't be able to simply type the path to the image in the browser. I'll have another look at the GD stuff on PHP.net again.
> But then couldn't someone right-click and see the path to the image
> still?
The only time I have ever used PHP-GD was in some Uni coursework - you'd use functions within the library to create an image object, alter it dynamically (we drew coloured circles on ours
> But then couldn't someone right-click and see the path to the image
> still?
All they'd see is something like show_image.php?img=xxxx for the link to the image but then you'd be back to checking the referrer to prevent direct linking. The suggestion isn't any different to what Nimco already mentioned.
> Meh, won't stop people.
>
> PrntScrn and a little paint / photoshop does it all anyway.
That's fine, because I do want certain people to see the images, and they can do what they want with them.
On another note, you can call your image as image.php?id=xxxxx and use image.php to load the image so they can't tell where the image is coming from. You could even store the images in a database if you wanted.
PrntScrn and a little paint / photoshop does it all anyway.
Basic tutorial on it [URL]http://www.webmasterstop.com/tutorials/prevent-hotlinking.shtml[/URL]
This [URL]http://www.alistapart.com/articles/hotlinking/[/URL] covers it also, and suggests methods for using PHP as well. Although using PHP is extreme because of the extra load it puts on the server.