sphoenixee
08-17-2008, 05:26 PM
I would like to load binary data and output it to browser.
For example, I have a sound file I want people to download. How do I use PHP to do this?
Doing: $audio=fopen('01 CD Track 01.mp3','rb');
header('Content-Type: audio/mpeg3');
echo $audio;
just prints the resource id#.
I do not want to use html because I want to use PHP to control access to the sound.
Thanks.
sphoenixee
For example, I have a sound file I want people to download. How do I use PHP to do this?
Doing: $audio=fopen('01 CD Track 01.mp3','rb');
header('Content-Type: audio/mpeg3');
echo $audio;
just prints the resource id#.
I do not want to use html because I want to use PHP to control access to the sound.
Thanks.
sphoenixee