2
Contributors
3
Replies
4
Views
8 Years
Discussion Span
Last Post by almostbob
0

mode_rewrite on your apache server will display the url however you see fit

or this server side, in this case php, the url is always http://www.site.com/download.php?file

where the file is accessed

<a href='download.php?file=thisfile.pdf'>download Thisfile.pdf</a>
<?php /*download.php*/
If (!$file) { die ('no file, incorrect filename'); }
if(!$_SERVER['HTTP_REFERER']=='note1') {die ('direct linking not permitted'); } //note1: single refering file- or find in array of files permitted to access the download folder 
$path='note2'; //note2: full path outside the root to downloadable files this is hidden from the user
header("Content-disposition: attachment; filename=$file");
header('Content-type: application/pdf;');
readfile("$path$file"); 
?>

ths file is a force download script, change 'content-disposition' to suit

Edited by almostbob: n/a

0

i using perl , and it isn't dynamic
i'm using ip how to deal with this

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.