Hi all,
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. 5 1560
Mickey wrote: Is there a way to find out when a user has completed a download?
You can let a PHP script supply the download:
<?php
readfile('download.exe');
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().
On 2006-02-18, Mickey <mi************@gmail.com> wrote: Hi all,
Is there a way to find out when a user has completed a download?
serve the file using PHP and record the start an end of the sending
a database or file etc...
--
Bye.
Jasen
On 2006-02-18, Sjoerd <sj******@gmail.com> wrote: Mickey wrote: Is there a way to find out when a user has completed a download?
You can let a PHP script supply the download:
<?php readfile('download.exe'); 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().
Yeah, that's what I meant, but also increase the downloadcount before the
readfile.
This also means that users will not be able to resume aborted downloads.
but will have to restart them.
--
Bye.
Jasen
There are also various modules and options for apache (or whatever
webserver you use, more than likely) that allow you to limit the
bandwidth, number of connections, etc.
mod_bandwidth for apache, iirc, though there are probably more
Thanks for all the suggestions.
In the end I used : <?php database_query('UPDATE downloadcount SET number=number+1'); readfile('download.exe'); database_query('UPDATE downloadcount SET number=number-1'); ?>
Thanks again. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: David Barrett |
last post by:
I'm proud to announce the completion of QwikiWiki v1.4.1, available
for download now!
QwikiWiki has the fastest installation, easiest syntax, and the
fewest, highest-value features of any wiki...
|
by: Steven T. Hatton |
last post by:
Some people have suggested the desire for code completion and refined
edit-time error detection are an indication of incompetence on the part of
the programmer who wants such features. ...
|
by: Ron Vecchi |
last post by:
Hello,
Through using this and many other Microsoft dotnet newsgroups I have been
pointed towards many helpful open source projects and articles that have
helped a great deal in my studies as...
|
by: Steve Lloyd |
last post by:
Hi, I am trying to create a popup progress box for a downloading file and
then do a page redirect/transfer on completion of the download and also to
confirm completion of the download, much like...
|
by: Dan D |
last post by:
I have a large install file (an exe) on my web server that people
download and install from. Looking at my log files, I see a lot of
people downloading it, but no way to tell for sure if they...
|
by: Dan D |
last post by:
I have a large install file (an exe) on my web Apache server that people
download and install from. Looking at my log files, I see a lot of
people downloading it, but no way to tell for sure if...
|
by: andrew.zahra |
last post by:
Is there any way to track completion of a download with PHP? I would
like to be able to check if a download completed successfully.
My first thought is that I might need to use an applet?
Any...
|
by: Santel |
last post by:
Hi,
To provide download functionality, I used the below code.
Response.ContentType = "application/x-download";
string strFileName=@"d:\Landscape.jpg";...
|
by: origami.takarana |
last post by:
Intrusion Detection Strategies
-----------------------------------
Until now, we’ve primarily discussed monitoring in how it relates to
intrusion detection, but there’s more to an overall...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
by: PapaRatzi |
last post by:
Hello,
I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
|
by: Defcon1945 |
last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
|
by: af34tf |
last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome former...
| |