Page 1 of 1

PHP Header to Output MP3

Posted: 11 Aug 2015, 13:40
by Marius
Hello
What header() I need to use to output a mp3 file with php so the mp3 to play within the browser?

PHP Header to Output MP3

Posted: 11 Aug 2015, 13:44
by Admin
Hi
You can use this header() in php to properly output a mp3 audio file.

Code: Select all

header('Content-Type: audio/mpeg'); 
- For a complete code see this page: https://coursesweb.net/php-mysql/output- ... ad-mp3-php