summaryrefslogtreecommitdiff
path: root/streammusic.php
diff options
context:
space:
mode:
Diffstat (limited to 'streammusic.php')
-rw-r--r--streammusic.php14
1 files changed, 14 insertions, 0 deletions
diff --git a/streammusic.php b/streammusic.php
new file mode 100644
index 0000000..e1170f7
--- /dev/null
+++ b/streammusic.php
@@ -0,0 +1,14 @@
+<?php
+//set headers to mp3
+$file = $_GET['file'];
+header("Content-Transfer-Encoding: binary");
+header("Content-Type: audio/mp3");
+header('Content-length: ' . filesize($file));
+header('Content-Disposition: attachment; filename="track.mp3"');
+header('X-Pad: avoid browser bug');
+Header('Cache-Control: no-cache');
+
+readfile($file);
+die();
+
+?>