Forcing the browser to Download, instead of stream mp3's..?

Associate
Joined
15 Jan 2003
Posts
1,117
Location
Bristol/Manchester Uni
Forcing/limiting the user to Download, and not stream mp3's..?

Hey,

Basically I think I remember reading on here a long time ago how to force the browser to give the user the option to save, instead of just using quicktime/wmp etc.. to stream the file from the webserver.

But after searching Google, and the forums I can't find anything! ..maybe its not possible?

So can anyone help me out please, on a way to stop mp3's being streamed from my webserver?...

Thanks. ;)
 
Last edited:
Volcs said:
I don't know how to do it in the browser directly but this may be of some interest:

http://all-streaming-media.com/record-audio-stream/

Sorry I wasn't very clear.. I mean I have a website with mp3's for visitors to download, but when they click the link it opens it in Quicktime/WMP and streams the track from my webserver instead of downloading.

I don't want them to be able to stream the track and instead just want them to be able to download it from my webserver.

Sorry for not making myself clear.. any help would be great.

;)
 
You'll need to issue the header:

Code:
Content-displacement: attachment

Search on Google for the above for oodles of info :)
 
Dj_Jestar said:
You'll need to issue the header:

Code:
Content-displacement: attachment

Search on Google for the above for oodles of info :)

Thanks, just err.. I guess I'm doing something completely wrong as I searched for the above in different forms and can't get any relevant results or anything even remotely to do with web design?!

If I search for the phrase "Content-displacement: attachment" I get about 3/4 results. I tried just "Content-displacement" and I only get results pointing to a Firefox bug which displaces content.

Any more help would be great! ;)
 
I'm sure I used something like
header("Content-Disposition: attachment; filename=blahh.xls");
on an old php project, but don't have it anymore.
 
Back
Top Bottom