Jump to content

How to create trafficshare quota


saxtor

Recommended Posts

hey guys i have a server and i need to know how to limit users bandwidth with there downloading i am using a system like rapidshare it will be an imitation of trafficshare i have various users and they are raping bandwidth, the system will be like this if the user request to download a file like 1gb i will give them 10gb per day so when they are finshed downloading the 1gb it will be deducted from there account if the user has 1 gb in there trafficshare and the user is downloading 2gb the download will stop it will not download it will give them a 404 response that there trafficshare quota is up and the download wouldn't be able to resume i would like  to know whats the cost of building such system  if you can give me some ideas i would be happy this is part of my code but i am flaws because when a user downloads uses a download accelerator the code doesn't terminate! and the user goes over the quota bandwidth the could never stops! 

 

/**

* Use download.php include you file

*$file  = YOUR FILE;

*$object->set_byfile($filename); //Download from a file

*/

 

/**

* then use this when you are downloading with firefox

* http://YORSERVER/a.php

** you will see how much you downloaded how ever if use a download accelerator it will

**go over the quota to 10% more or less! i need to correct that flaw

*/

 

 

 

[attachment deleted by admin]

Link to comment
https://forums.phpfreaks.com/topic/203168-how-to-create-trafficshare-quota/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.