Welcome Guest, Not a member yet? Register   Sign In
Impossible Force Download
#8

[eluser]deltajam[/eluser]
[quote author="Mike Ryan" date="1224804565"][quote author="deltajam" date="1224727338"]
Code:
$data = file_get_contents( base_url() . "media/downloads/movie.mov");
        
$name = 'myphoto.jpg';

force_download($name, $data);
[/quote]

The file name has a jpg extension, but the file is a .mov. I assume from the size that it is a movie file, and not an image. If that is the case, have you considered streaming the video using a flash video player, a la YouTube? This would handle the streaming, and you can provide a link to download the file separately.

Quote:After making some calls, I think I got it working. But I'm worried (again, possibly due to ignorance) about 100 users all downloading a 50mb file at once. Will they get the same error as before?

No, the memory limit is per script, i.e. each has an allocation of 120M. Although your server will probably be crawling by this point, unless you have 7GB+ RAM ;-)[/quote]

My site is a download site for videos. You are able to preview the video with a Flash Video player, but we are talking about downloading large video files here.

I'm not sure how much RAM the server has, I can imagine that my client would enjoy a dedicated server if RAM becomes an issue.


Messages In This Thread
Impossible Force Download - by El Forum - 10-22-2008, 03:02 PM
Impossible Force Download - by El Forum - 10-22-2008, 03:20 PM
Impossible Force Download - by El Forum - 10-22-2008, 05:03 PM
Impossible Force Download - by El Forum - 10-23-2008, 08:31 AM
Impossible Force Download - by El Forum - 10-23-2008, 09:37 AM
Impossible Force Download - by El Forum - 10-23-2008, 10:50 AM
Impossible Force Download - by El Forum - 10-23-2008, 12:29 PM
Impossible Force Download - by El Forum - 10-23-2008, 02:13 PM
Impossible Force Download - by El Forum - 10-23-2008, 02:27 PM
Impossible Force Download - by El Forum - 10-23-2008, 03:00 PM



Theme © iAndrew 2016 - Forum software by © MyBB