Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- Download completion detection
February 18, 2006, 6:02 pm
rate this thread
Is there a way to find out when a user has completed a download?
I ask this because I have a current system where users download files,
however due to serious bandwidth issues I need to limit the amount of
downloads at one time.
Ideally, I want to be able to allow a maximum of 5 members to access
the download page at one time (with one download per person at one
time), and then let the next user download.
I was thinking, have a db table, file... with a counter, increment the
counter with every file downloaded started, and then decrement the
counter on completion of the file, but how do I know when the user is
finished the download?
Am I over complicating this?
Has anybody got any suggestions that may help?
I would really aprechiate any help or suggestions at all.
Thanks in advance.
Re: Download completion detection
You can let a PHP script supply the download:
database_query('UPDATE downloadcount SET number=number-1');
Beware of the maximum execution time: if the download takes more than
30 seconds, it will abort. See set_time_limit().
- Richard Levasseur
February 19, 2006, 5:46 am
- » ssh on command line: force using a group size (prime size) of 1024 (and no...
- — The site's Newest Thread. Posted in » Secure Shell Forum