|
|||||||
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|
#1 |
|
Bronze Member
![]() Join Date: Oct 2008
Posts: 59
|
Hi everyone,
I have some very large video files that i want to share with my family members. I uploaded a video on my server and created a link. If you click on the link it will automatically start to stream the video. How do i force the browser to download the file instead?? I am aware that you can just right click on the link and click "safe link as" however, i want to make it as easy as possible for my older family members. I read somewhere that i can zip the file and then it will automatically start the download when you click on the link, however, my older family members probably wont be able to figure out how to unzip the file. Is there a way to make this as easy as possible? http://www.newpeninsulahomes.com/vid...te/videos.html |
|
|
|
|
|
#2 |
|
Gold Member
![]() Join Date: Oct 2008
Location: Ireland
Posts: 349
|
Yes. Name this file download.php and point the link towards this file rather than the wmv file.
Code:
<?php
$filename='nameofthefile';
header('Content-disposition: attachment; filename='.basename($filename));
header("Content-Type: force/download");
header("Content-Transfer-Encoding:binary");
header('Content-Length: '.filesize($filename));
readfile($filename);
?>
__________________
Conor |
|
|
|
|
|
#3 |
|
Banned
![]() Join Date: May 2009
Posts: 66
|
where the heck did u get that?
|
|
|
|
|
|
#4 |
|
Silver Member
![]() Join Date: May 2009
Posts: 107
|
Sharing large files with friends and family? Direct download alone might not be the best way to go. Have it available on your site for future downloads but in the beginning, when everyone wants it, you can save bandwidth buy creating a .torrent file and sharing your files that way.
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|