snipersteve Posted July 22, 2006 Share Posted July 22, 2006 Hey all. I have a question for you that may or may not be related to PHP.I have an area on my site where users can download different files. (mainly videos I have created) Currently I am just pulling the filename from my database, and throwing it into a hyperlink. Of course, when you click on the link the file will start streaming as its a standard video file that Windows Media Player recognizes. What I want to do is have the window appear where it askes you would you like to save or open the file. The user could then select which they want to do. The reasoning behind this is that some of my longer videos are 70+MB and take a while to initilize the stream. I don't want people to think its not working, and would rather give them the option right away to save or open the file.Thanks! Quote Link to comment Share on other sites More sharing options...
Joe Haley Posted July 22, 2006 Share Posted July 22, 2006 I remember reading somewhere that the mime type application/octet-stream would [u]make[/u] the browser download a file.Thus, 2 opptions i can see:Send the file in a PHP script(something to the effect of:)header('Content-type: application/octet-stream');echo @file_get_contents();or, use a .htaccess file to set your videos to serve as a specific mime type. As i recall, its:AddType application/octet-stream .wmw Quote Link to comment Share on other sites More sharing options...
snipersteve Posted July 22, 2006 Author Share Posted July 22, 2006 I fail:http://www.phpfreaks.com/forums/index.php/topic,95433.0.html:( Thanks for your help though! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.