How force download mp4 file |
Hi
I have 10 video files with mp4 format I download this files from my php script My code is : PHP Code: header('Content-Description: File Transfer'); But speed is low when user try to download and when i use redirect(base_url().$filename); speed is good and user can watch video speedly M goal from this way is user cannnot download video and have to watch it with my php script file Thanks
@omid_student,
There is a lot of things to trouble shoot. What kind of connection does your user have? Are there any download limitations from your hosting company? How big are the videos?
Here are a few different ways of doing it:
Force download MP4 file – PHP or .htaccess What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
(09-02-2019, 08:09 AM)php_rocs Wrote: @omid_student,Thanks Files are about 20 mb My users are two user now When i redirect to video,speed is good (09-02-2019, 09:00 AM)InsiteFX Wrote: Here are a few different ways of doing it:Thank you Do you can say why speed is low when i try send mp4 to header?
No idea why it would be slow using the header, the users internet speed could slow it down.
What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
you could try doing an ob_clean(); first and see if that helps.
What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
Try running the CI Profiler and check your log files in CI and on the server.
What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
|
Welcome Guest, Not a member yet? Register Sign In |