Jump to content
  • Advertisement
Sign in to follow this  

[web] PHP Content type

This topic is 4712 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

What content type header would I use to display an audio file. For example I want it so it will read in a .wav, .wma/etc file and display it. What header do I need to use with PHP. It might sound strange to want to do it this way but this is how it needs to be done.

Share this post


Link to post
Share on other sites
Advertisement
actually let me phrase that better, how would I play an audio file by reading it in through PHP? say for example I have a file called test.wav, I would use the Content-Type: audio/wav file however how would I echo it out and play?
Thanks in advance.

Share this post


Link to post
Share on other sites
You still need to put it into a HTML file, like you do with PHP generated images. Only instead of using the path of /my_music/test.wav on whatever method you choose to play the audio, you specify /my_music/test.php instead.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!