What HTTP headers do I need to transfer the ASF file?

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

<?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 go to this file, it immediately starts streaming video. But Internet Explorer is a completely different story. When I go to this link in IE, it sequentially tries to download the file as if it were an attachment, not a streaming one in the browser. What am I missing, what does IE depend on?

+3
source share
3 answers

, Content-Disposition. ?

+1

, IE Media Player . . .

+1

From your description, it sounds as if your IE is configured to save the file .asf, not the stream. Perhaps you can try opening a similar file on your local drive in IE to see if it is configured for its stream.

0
source

Source: https://habr.com/ru/post/1740959/


All Articles