summaryrefslogtreecommitdiff
path: root/streammusic.php
diff options
context:
space:
mode:
authorAlib <aliboba@free.fr>2010-02-24 11:49:43 +0100
committerAlib <aliboba@free.fr>2010-02-24 11:49:43 +0100
commit4703e91adada95b89ebd3de7086ebc8588f8424f (patch)
tree8731712e26d25b5eb3489e382eabb36336056858 /streammusic.php
parentf254a8b5816384da1fa7a3bb639232ecec582014 (diff)
downloadistreamdev-4703e91adada95b89ebd3de7086ebc8588f8424f.tar.gz
istreamdev-4703e91adada95b89ebd3de7086ebc8588f8424f.tar.bz2
experimental playlist for music
Diffstat (limited to 'streammusic.php')
-rw-r--r--streammusic.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/streammusic.php b/streammusic.php
index e1170f7..ab93cce 100644
--- a/streammusic.php
+++ b/streammusic.php
@@ -1,14 +1,16 @@
<?php
//set headers to mp3
+$dir = $_GET['dir'];
$file = $_GET['file'];
header("Content-Transfer-Encoding: binary");
header("Content-Type: audio/mp3");
-header('Content-length: ' . filesize($file));
+header('Content-length: ' . filesize($dir.$file));
header('Content-Disposition: attachment; filename="track.mp3"');
header('X-Pad: avoid browser bug');
Header('Cache-Control: no-cache');
-readfile($file);
-die();
+readfile($dir.$file);
+$URL="index.php?action=media&dir=$dir";
+header ("Location: $URL");
?>