473,386 Members | 1,715 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

download traffic counter

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?
Jul 17 '05 #1
2 1960
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/

Jul 17 '05 #2
dr********@hotmail.com (m-flo) wrote in message news:<53**************************@posting.google. com>...
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 manage your downloads not via direct links to files but
through a script (i.e. download.php?$filename). download.php could,
before starting the download of $filename, get the size of $filename,
store it somehow and check and enforce your limits.

micha
Jul 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: S P Arif Sahari Wibowo | last post by:
Hi! I am thinking to have a client-side script doing processing on file downloading, basically the script will process a downloaded file from the server before it received by the user. For...
0
by: Marius III | last post by:
Hi there, I am building a File download counter in PHP5. It's working fine but the problem is that its not working with any Download Managers for ex: Free Download Manager / DAP etc. The...
7
by: Smartbomb | last post by:
Hey guys and gals, I was wondering how I could do a bandwidth traffice moniter on incoming and outgoing traffic on a network card. is there a simple way to moniter and record the traffic? I know of...
5
by: Mickey | last post by:
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...
5
by: guilherme.oliveira | last post by:
Hi. What is the simple way to do a traffic counter in C ? I'm searching but there aren't any records of total transffers in /proc to get the value. Thanks in advance.
7
by: mistral | last post by:
I use htaccess to protect directory and granting access to download file only for the authorized users. Just want implement simple PHP file download counter for single file. I need track the number...
12
by: devospice | last post by:
Hi, I'm trying to create a download counter for individual files on a web site and I'm not sure how to do this. Right now I'm using Webalizer to just read the log files and see how many times...
3
by: malaysiauser | last post by:
Dear all, Last year I install a download control script in Linux server. its working. This year i'd changed my hosting server to other company. i'd tried install the script. It was installed...
1
by: Ken Fine | last post by:
I have been investigating programmatically downloading FLV content from various sites ("video scraping"??) Many interactive GUI tools do this, such as the Orbit downloader. At the heart of them...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.