diff options
author | TheTroll <trolldev@gmail.com> | 2010-02-24 16:07:12 +0100 |
---|---|---|
committer | TheTroll <trolldev@gmail.com> | 2010-02-24 16:07:12 +0100 |
commit | 434ac8390a4ca5629a070ddb00e88d534a813eee (patch) | |
tree | 66ffcff9254280b8c75765043ce5a91f7452fcca /streammusic.php | |
parent | 6d2af1fac7bd066b75ebd237cc538e29fd21b729 (diff) | |
download | istreamdev-434ac8390a4ca5629a070ddb00e88d534a813eee.tar.gz istreamdev-434ac8390a4ca5629a070ddb00e88d534a813eee.tar.bz2 |
Now support playing a full dir (still buggy)
inc_home.php cleanup
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"); ?> |