On 08/06/2003 12:43 PM, Boaz Yahav wrote:
I'm trying to allow users to download files from my servers. Files can be hundreds of MB in size and sometimes even a few GB. This is a closed section of the site and i would like to allow only members to be able to DL the files.
I thought of using a download function that uses headers and readfile()
or fread(). This way i can
check who is the user and send / not send the file. However, this does
not seem to work with such big files.
I think you are exceeding your PHP memory limit. I suggest that you use fpassthru or maybe fread in many chunks of 100K and use flush() after each chunk echo so you pass the data back to Apache instead of keeping it in your PHP memory space.
--
Regards, Manuel Lemos
Free ready to use OOP components written in PHP http://www.phpclasses.org/
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php