Website video download error
Posted: Sat Apr 03, 2010 11:37 pm
So I uploaded a video onto my website. But when I go to the link it streams instead of downloading so I decided to use this php script I found:
<?php
header('Content-type: /');
header('Content-Disposition: attachment; filename="Movie.wmv"');
readfile('Movie.wmv');
?>
But when you download the video it is corrupted. But streaming it is fine. So am I missing something here? I'm guessing it's content-type but not sure how this statement works. Thanks.
<?php
header('Content-type: /');
header('Content-Disposition: attachment; filename="Movie.wmv"');
readfile('Movie.wmv');
?>
But when you download the video it is corrupted. But streaming it is fine. So am I missing something here? I'm guessing it's content-type but not sure how this statement works. Thanks.