Forum Moderators: open
I wrote a asp file with the following code:
<% Response.ContentType = "audio/mpeg" %>
and when i execute the asp file, it seems to recognise it as an mp3 file and opens it with realplayer. But an eror occurs because the file is empty.
I want the actual file to stream something from another url e.g. http://www.anotherdomain.com/something.mp3, can anyone tell me how i can do this:
i tried the following but it didnt work:
<%
Response.ContentType = "audio/mpeg"
Response.Redirect "http://www.anotherdomain.com/something.mp3"
%>
any help would be very much appreciated.
many thanx in advance
[edited by: DaveAtIFG at 8:53 pm (utc) on Dec. 25, 2003]
[edit reason] DeLinked URL [/edit]
<%Response.Redirect "http://www.anotherdomain.com/something.mp3"
%>
..as the content-type headers have to come from the server at www.anotherdomain.com - they are out of your control.
This will only "play" automatically if the server at www.anotherdomain.com is set-up to recognise the .mp3 extension and send the appropriate content-type headers (although some browsers may try and be clever and play it anyway).
If you want full control; you will need to send the content-type headers and the MP3 from your server. I'm not sure how you do that in ASP, but it will be possible somehow...