Re: [PHP] Downloading very large files

2006-02-14 Thread Curt Zirzow
On Mon, Feb 13, 2006 at 03:27:32PM -0700, Jonathan Duncan wrote: I have an application that delivers files to the client browser. These files a very large video files. 250mb+ each. I have two options: 1) I could have PHP deliver the file with fread, or 2) I could have PHP present a link

[PHP] Downloading very large files

2006-02-13 Thread Jonathan Duncan
I have an application that delivers files to the client browser. These files a very large video files. 250mb+ each. I have two options: 1) I could have PHP deliver the file with fread, or 2) I could have PHP present a link to the file. However, for security purposes, I would rather not

Re: [PHP] Downloading very large files

2006-02-13 Thread Rory Browne
I've seen this problem many times before, but I'm not sure what solution was found. Possible solutions: Encrypt the file, make it publicly available, and then give the right people the encryption key. Put it behind a .htaccess file allowing only the IP of the correct person - remove the

Re: [PHP] Downloading very large files

2006-02-13 Thread Jonathan Duncan
Thank you for the input. For now we are just using PHP to create symbolic links to the video files and the links are removed when they are done viewing the video. We are open to other suggest still, but for now, this fills our needs and bypasses putting so much stress on PHP as to put

Re: [PHP] Downloading very large files

2006-02-13 Thread Joe Wollard
Jonathan, Not sure how you're using fread, but here's a slightly modified version of what's in the manual that might help: ?php $handle = fopen(/var/dump/vids/test.mpg, rb); while (!feof($handle)) { print fread($handle, 8192); } fclose($handle); ? If my understanding of this code is correct