diff options
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 |