diff options
author | Filipp Lepalaan <filipp@mac.com> | 2010-06-23 22:28:23 +0300 |
---|---|---|
committer | Filipp Lepalaan <filipp@mac.com> | 2010-06-23 22:28:23 +0300 |
commit | 322a983bedf3ed60027bed5d2ea28d4daea21d28 (patch) | |
tree | 0217f6fc47c8a0c0db3377dc80eb282aa780d266 /get.php | |
download | fsfeed-322a983bedf3ed60027bed5d2ea28d4daea21d28.tar.gz fsfeed-322a983bedf3ed60027bed5d2ea28d4daea21d28.tar.bz2 fsfeed-322a983bedf3ed60027bed5d2ea28d4daea21d28.zip |
Diffstat (limited to 'get.php')
-rw-r--r-- | get.php | 20 |
1 files changed, 20 insertions, 0 deletions
@@ -0,0 +1,20 @@ +<?php +//// +// fsfeed/get.php +// download a file +$path = $_GET['f']; +if (file_exists($path)) { + header('Content-Description: File Transfer'); + header('Content-Type: application/octet-stream'); + header('Content-Disposition: attachment; filename='.basename($path)); + header('Content-Transfer-Encoding: binary'); + header('Expires: 0'); + header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); + header('Pragma: public'); + header('Content-Length: ' . filesize($path)); + ob_clean(); + flush(); + readfile($path); + exit; +} +?>
\ No newline at end of file |