0 Comments

Problem: I have a movie hosted. I can link to it; however, I want people to download the movie, not view it in a browser.

Solution:
Here’s the paraphrased version I learned from the brilliant folks at Boutell.com. Create a page (in Dreamweaver, or wherever) with the following:
<?php
header('Content-disposition: attachment; filename=yourmovietitle.mov');
header('Content-type: video/mov');
readfile('yourmovietitle.mov');
?>

Save that file as movielink.php, or something more specific. Add that to the same folder (on your host) that your movie is in. Change the name from movie.mpg to the actual name of your file. Finally, write the link as <a href="movielink.php">Download me</a>.
You create a file that forces your browser to save, not open.

    Related Posts

Bookmark This

About

Subscribe to learn about ed tech awesomeness, and join the discussion of how technology is transforming the face of education. Email me if you'd like.

Contact