diff options
Diffstat (limited to 'streammusic.php')
-rwxr-xr-x[-rw-r--r--] | streammusic.php | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/streammusic.php b/streammusic.php index ab93cce..8dbcbfe 100644..100755 --- a/streammusic.php +++ b/streammusic.php @@ -1,16 +1,18 @@ <?php + //set headers to mp3 -$dir = $_GET['dir']; + +$mediapath = $_GET['mediapath']; +$subdir = $_GET['subdir']; $file = $_GET['file']; + header("Content-Transfer-Encoding: binary"); header("Content-Type: audio/mp3"); -header('Content-length: ' . filesize($dir.$file)); -header('Content-Disposition: attachment; filename="track.mp3"'); +header('Content-length: ' . filesize($mediapath .$subdir .$file)); +header('Content-Disposition: attachment; filename="streaming.mp3"'); header('X-Pad: avoid browser bug'); Header('Cache-Control: no-cache'); -readfile($dir.$file); +readfile($mediapath .$subdir .$file); -$URL="index.php?action=media&dir=$dir"; -header ("Location: $URL"); ?> |