Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- if (!empty($_GET['value'])) {
- include_once('./functions.php');
- $track = 'audio/'.basename(getFileNameFromHash($_GET['value']));
- if (file_exists($track)) {
- header("Content-Type: audio/mpeg");
- header('Content-Length: ' . filesize($track));
- header('Content-Disposition: inline; filename=' . $track);
- header('X-Pad: avoid browser bug');
- header('Cache-Control: no-cache');
- readfile($track);
- } else {
- header($_SERVER['SERVER_PROTOCOL'].' 404 Not Found', true, 404);
- echo "no file";
- }
- exit;
- }
- ?>
- <audio src="/play.php?value=d41d8cd98f00b204e9800998ecf8427e" autoplay loop controls></audio>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement