aboutsummaryrefslogtreecommitdiffstats
path: root/get.php
diff options
context:
space:
mode:
Diffstat (limited to 'get.php')
-rw-r--r--get.php20
1 files changed, 20 insertions, 0 deletions
diff --git a/get.php b/get.php
new file mode 100644
index 0000000..fd466b5
--- /dev/null
+++ b/get.php
@@ -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