Posted May 30 '09 at 12:49 PM
Posts: 3,100
This has a couple of parts to it.
1) You mention "club members".
Does that mean they have logged into your website?
I ask this because you may have something that will check to
see if the site visitor is logged in ... other visitors can't download the image.
2) The image could be stored in a secret directory, and you
serve the image (or photo) using PHP. The site user would be
able to see the photo on their browser (and copy it), but they
won't see where the photo originated from.
This is a simple example (I found this on the internet).
It does open a dialog box (open or save?), but the user
does not know where the image came from.
<?php
if($_GET){
if($_GET['file']) {
$filename = $_GET['file'];
$download_path = "files/";
}
if(eregi("\.\.", $filename)) die("I'm sorry, you may not download that file.");
$file = str_replace("..", "", $filename);
if(eregi("\.ht.+", $filename)) die("I'm sorry, you may not download that file.");
$file = "$download_path$file";
if(!file_exists($file)) die("I'm sorry, the file doesn't seem to exist.");
$type = filetype($file);
$today = date("F j, Y, g:i a");
$time = time();
header("Content-type: $type");
header("Content-Disposition: attachment;filename=$filename");
header("Content-Transfer-Encoding: binary");
header("Cache-Control: ");
header("Pragma: ");
set_time_limit(0);
readfile($file);
}
?>