diff --git a/src/audio.php b/src/audio.php index 1e4441ab5c6665a67eb3ce63621ad43d7f9771d5..43cbc8ecafa7e3fb695bd53e2124d4f59ab74b15 100644 --- a/src/audio.php +++ b/src/audio.php @@ -11,7 +11,10 @@ $random_number = rand(0, $files_count - 1); $random_file = $DIR . '/' . $files[$random_number]; // Redirect -header("Location: " . $random_file); +header('Content-Type: audio/mpeg'); +header("Content-Transfer-Encoding: Binary"); +header("Content-disposition: attachment; filename=\"" . $random_file . "\""); +readfile($random_file); die(); ?> \ No newline at end of file