NYCPHP Meetup

NYPHP.org

[nycphp-talk] header to force helper app for MP3 file

Stephen Musgrave stephen at musgrave.org
Fri Jun 18 11:46:18 EDT 2004


from browser to browser, platform to platform, there are varying scenarios
that a user is put through when clicking on an MP3 file.  on my mac a new
page opens with quicktime embedded in the middle and the file plays.  on one
PC that it was tested on, windows media player launched.

i've tried to use various header directives which cause, again, varying user
experiences a couple that i have tried include:

- - - - - - - - 

header('Content-Type: application/mpeg');
readfile($filename);

- - - - - - - - 

header('Content-Type: audio/mpeg');
readfile($filename);

- - - - - - - - 

header('Content-Type: audio/x-mpegurl');
readfile($filename);

- - - - - - - - 

i want the user's helper application for mp3s to launch.  if there isn't one
defined, they should be prompted to decide to choose one or download.

any tried and true method?

thanks much : stephen





More information about the talk mailing list