Re: Feeding Windows Media Player with PHP

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Zach was right, I typo'd my way through that : Should be
video/x-ms-wmv for .wmv, and audio/x-ms-wma for .wma, or
video/x-ms-asf (for either wma or wmv in .asf file type)

For MP3 you should definitely send audio/mpeg header though ;-)

See here for further details if you do use WM MIME types :
http://www.microsoft.com/windows/windowsmedia/howto/articles/webserver.aspx#webserver_topic2

Cheers - Neil

On Mon, 15 Jan 2007 12:11:12 -0800, JayEpoch
<JayEpoch@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:

Thanks for the replies guys, I'm not using wmv though... I'm using MP3, what
header should I use then?

Thanks, I really appreciate your help.

Jason@ProtonRadio

"zachd [MSFT]" wrote:


I'm loosely the manager of MIME types for the team - as a minor note, I
don't believe there is a application/x-ms-wmv MIME type. video/x-ms-wmv may
be what you meant... ?

As regards the OP, Content-Disposition is meant to get the content to
download 100% first. As far as I'm aware, WinAMP and iTunes are doing the
wrong thing here...

-Z
--
Speaking for myself only.
See http://zachd.com/pss/pss.html for some helpful WMP info.
This posting is provided "AS IS" with no warranties, and confers no rights.
--
"Neil Smith [MVP Digital Media]" <neil@xxxxxxxxxx> wrote in message
news:lf0iq21gk5upd80bhvvlgh6t7sfpec9m08@xxxxxxxxxx
You should be sending a header of application/x-ms-wmv there, I'm not
sure what all this force download and attachment stuff is ~intended~
to do, but it seems to be having the effect of doing exactly what
you've told it !

Just send the correct content-type header, then send the
content-length, then the binary stream data.

Cheers - Neil

On Fri, 12 Jan 2007 14:30:02 -0800, JayEpoch
<JayEpoch@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:


I'm trying to develop a playlist in Windows Media Player where the audio
is
fed through PHP for security reasons. It works fine in Winamp and iTunes,
but
Windows Media can't play the file.

We're trying this header with PHP:
header("Pragma: public");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0,
pre-check=0");
header("Cache-Control: private",false);
header("Content-type: application/force-download");
header('Content-Transfer-Encoding: Binary' ); // added
header("Content-Disposition: attachment;
filename=\"".basename($FILE)."\";" );
readfile ( $URL );

And so far we get it where it DOWNLOADS the file 100% and then starts
playing. Is there anyway to have it start playing while its downloading,
like
iTunes and Winamp does?

Thanks for any help!
------------------------------------------------
Digital Media MVP : 2004-2007
http://mvp.support.microsoft.com/mvpfaqs



------------------------------------------------
Digital Media MVP : 2004-2007
http://mvp.support.microsoft.com/mvpfaqs
.



Relevant Pages

  • Re: Feeding Windows Media Player with PHP
    ... download 100% first. ... WinAMP and iTunes are doing the ... Just send the correct content-type header, ... I'm trying to develop a playlist in Windows Media Player where the audio ...
    (microsoft.public.windowsmedia.player)
  • Re: Security component upgrade (greyed out)
    ... components of windows media player. ... download it. ... Digital Media MVP: 2004-2010 ...
    (microsoft.public.windowsmedia.player)
  • Re: Enabling a Client to Download a File
    ... It must be somthing with the strings in the header ... send a file to the client, this page is called from another page (using ... show the download progress ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: The starwars spammer saga
    ... test on ANY header, like the PATH header where you can filter out ... So does that mean you configured Xnews to download headers+body (so you ... download the bodies of the posts. ... That would shorten the time to update a newsgroup with new articles ...
    (alt.comp.anti-virus)
  • Include "To:" Header in IMAP Download
    ... I have some custom content filters set up ... Our IT staff then sets up that IMAP account in Outlook ... only download header information. ...
    (microsoft.public.outlook.installation)