Skip to content
WJunction - Webmaster Forum

How do file hosters count traffic?

Status
Not open for further replies.
Just out of interest, how do file hosters count the exact traffic a user has generated for a file. I know there is x-sendfile feature which makes it possible to send a file natively via web-server (instead of e.g. php), but what happens if a user starts a 100mb download and aborts after 1mb? Of course only 1mb should be counted, not 100mb.

How to do this? Is this some kind of special module for e.g. nginx/lighttpd, maybe connected with mysql (e.g. "update download traffic in database every 10mb")?
 

4 comments

Just a heads up, the OP wants to know HOW they do it, what code/script whaever they use, because maybe he is working on something similar.
''Filehosts have there ways of working out things.'' is not a really a helpful reply.
I dont know the answer, i just replied to avoid getting other replies with no sense. :)
 
Im guessing they use a system which callsback to them once the download its completed, try downloading a filesharing script and try to look and test out how it works,
 
Just a heads up, the OP wants to know HOW they do it, what code/script whaever they use, because maybe he is working on something similar.

Yes right. I'm just interested in the technical aspect (don't want to actually use it for now).

Im guessing they use a system which callsback to them once the download its completed, try downloading a filesharing script and try to look and test out how it works,

I doubt I will find something since most if not all scripts are crap anyway. Of course you can implement it using php for example, but that is not efficient at all. I think the web-server has to be involved somehow as noted.
 
Status
Not open for further replies.

About the author

M
Active Member · Joined
88
Messages
16
Reactions
8
Points

Advertise on WJunction

Reach 1000's of webmasters, hosts & affiliates. Banner & sponsored-thread slots available.

Contact us
Back
Top Bottom