PHP Header to Output MP3

Discuss coding issues, and scripts related to PHP and MySQL.
Marius
Posts: 62

PHP Header to Output MP3

Hello
What header() I need to use to output a mp3 file with php so the mp3 to play within the browser?

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

Similar Topics