On Mon, 13 Dec 2004 13:22:52 -0800 (GMT-08:00), Bruce Douglas
<[EMAIL PROTECTED]> wrote:
> you might also look into 'bit torrent'...

You must have missed the part about 'cannot have this file in a
"public" location'.

>    Just thought I would pick the collective brain on this one. I have
>    a requirement to deliver a large EXE file to customers after they
>    order. The file is just under 400 MB in size and, because they have
>    just purchased it, I obviously cannot have this file in a "public"
>    location on the web server that someone could browse to.
> 
>    I can push the file out quite easily using a modified header and a
>    simple script to check if they can download it or not, but with
>    such a large file a significant number of web browsers fail to
>    obtain the entire EXE before closing - or any other number of
>    factors kick into play (their PC resets, ISP disconnects, Windows
>    crashes, etc).

Use set_time_limit(0); to prevent the timeout.  ignore_user_abort() is
pretty handy too.

If that doesn't work you might give them authenticated http access
with temporary passwords.  You can have the usernames and passwords in
a db and pass the proper auth headers with PHP.

>    Some browsers support resuming download, but not when the file has
>    been sent via the headers I use, also FTP is not an option as I
>    cannot create and destroy FTP users on the server easily (or for
>    that matter assume the customer knows how to perform FTP
>    operations).

I feel your pain.

>    I'm also aware that it's not such a hot idea to lock-up Apache for
>    the time it takes to download the whole file, especially with a
>    large number of users doing this.

Apache 2 is pretty good with multiple threads from what I hear.  I use
it but not in a production environment.


-- 
Greg Donald
Zend Certified Engineer
http://gdconsultants.com/
http://destiney.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to