aboutsummaryrefslogtreecommitdiffstats
path: root/get.php
diff options
context:
space:
mode:
authorFilipp Lepalaan <filipp@mac.com>2010-06-23 22:28:23 +0300
committerFilipp Lepalaan <filipp@mac.com>2010-06-23 22:28:23 +0300
commit322a983bedf3ed60027bed5d2ea28d4daea21d28 (patch)
tree0217f6fc47c8a0c0db3377dc80eb282aa780d266 /get.php
downloadfsfeed-322a983bedf3ed60027bed5d2ea28d4daea21d28.tar.gz
fsfeed-322a983bedf3ed60027bed5d2ea28d4daea21d28.tar.bz2
fsfeed-322a983bedf3ed60027bed5d2ea28d4daea21d28.zip
First commitHEADmaster
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