0, 2003 6:32 AM
Subject: Re: [PHP] download queue
I would do it this way. Output your files and update bandwith usage:
while($out=fread($file, 4096)) {
echo $out;
UPDATE bandwith_usage SET bandwith_usage = bandwith_usage+1 WHERE
second = UNIX_TIMESTAMP() LIMIT 1
if(mysql_aff
I would do it this way. Output your files and update bandwith usage:
while($out=fread($file, 4096)) {
echo $out;
UPDATE bandwith_usage SET bandwith_usage = bandwith_usage+1 WHERE
second = UNIX_TIMESTAMP() LIMIT 1
if(mysql_affected_rows()==0) { // if this is the first output in this
second
I
I'm considering start up a small download site with the large amount of
excess bandwith I have on my site, however I thought it would be cool to
put some sort of download queue up (you know, so all my bandwith doesn't
get eaten up when 500 random people suddenly decide to download a 500meg
fil
3 matches
Mail list logo