diff options
Diffstat (limited to 'streammusic.php')
-rw-r--r-- | streammusic.php | 8 |
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"); ?> |