summaryrefslogtreecommitdiff
path: root/streammusic.php
diff options
context:
space:
mode:
authorAlib <aliboba@free.fr>2010-02-24 10:22:43 +0100
committerAlib <aliboba@free.fr>2010-02-24 10:22:43 +0100
commitf254a8b5816384da1fa7a3bb639232ecec582014 (patch)
treea253ad361c722db83dcbcdc58d6f08a44cb45c51 /streammusic.php
parent88503d0f3a5e3724606754ecd8d4d109973e0d47 (diff)
downloadistreamdev-f254a8b5816384da1fa7a3bb639232ecec582014.tar.gz
istreamdev-f254a8b5816384da1fa7a3bb639232ecec582014.tar.bz2
first try for mp3 streaming. Works but not secure at all.
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();
+
+?>