What HTTP headers do I need to stream an ASF file?

Posted by SoaperGEM on Stack Overflow See other posts from Stack Overflow or by SoaperGEM
Published on 2010-04-13T16:38:47Z Indexed on 2010/04/17 16:23 UTC
Read the original article Hit count: 316

I have a simple PHP script that will either serve up a streaming ASF file or not, depending on whether you're logged in and have access to the file. It basically does this:

<?php

header('Content-Type: video/x-ms-asf');
header('Content-Disposition: inline; filename="file.asf"');
readfile('file.asf');

?>

This already works fine in Firefox; when you navigate to this file it starts the video streaming right away. But Internet Explorer is a different story. When I go to this link in IE, it consistently tries to download the file as if it were an attachment rather than streaming it in the browser. What I am missing that IE's getting hung up on?

© Stack Overflow or respective owner

Related posts about php

Related posts about http-headers