hello
i want to secure my data ,i have link to pdf file when click it give all path to pdf
like this
http://192.167.1.13/data/0000/000/000/0000-000-000-000.pdf
i want to change it
to be like this
http://192.167.1.13/xxxxxx
or any other
i want to change it start from /data
any help

Recommended Answers

All 3 Replies

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

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

perl is a server language, a very dynamic language actually
I don't know exactly how, but there is a perl analog to that php script
there are more google results than I can look at
http://www.google.com/search?hl=en&safe=off&q=secure+perl+file+download+script&meta=
perl is usually running as mod_perl on apache, mod_rewrite should be available to change the displayed url

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.