On Thu, 12 Aug 2004 15:53:07 -0700, m-flo wrote:
Hi
i have web site for educational stuff.. and i need to upload some
videos (mpeg,avi... ect)..
my hast has limited traffic .. so i need to control the downloaded
files to use a part of the traffic .. then disable the downloading
when the traffic for downlading this files to some point (lets say
3GB)..
all the files are in one directory (folder).. is there any php program
that can count how much is downloaded from this folder then disable
downloading after it reaches some point??
thanks guys
ps:if that group is the wrong group for this question ..can u tell me
where to ask?
You could run it through a script, something like: download.php?id=1 and
use that reference to a file (store ID / filename in DB etc with
filesize). The only problem here is that if the file was 3Mb and I only
downloaded 500k of it and stopped the download, it'd register that 3Mb had
been downloaded regardless. Due to the way in which the HTTP protocol
works, the server (and thus PHP) knows nothing of the transfer once
initiated to the client (browser).
If you're running apache, have a google for mod_throttle, this might be
better for you. If you require some assistance with that, you might find
better answers to that part in the alt.apache.configuration group.
Hope this helps a little =)
Regards,
Ian
--
Ian.H
digiServ Network
London, UK
http://digiserv.net/