 |
|
Innovation award
 Nominee: 7x
Winner: 1x |
This class can be used to limit (throttle) the speed of files served for download.
It intercepts the PHP script output by setting a buffering handler that is called every time a given number of bytes are served to the browser.
The class measures the time since the last time the PHP output buffer was flushed and hold on PHP for a while if the average download speed is above a given limit.
---------------------------------------------------------------------------
There are three different bandwidth shaping mechanisms to ensure adequate Quality of Service:
1) burst transfer rate will be switched off after sending X bytes to the user (this can be helpful to send small images quickly, and limit the download speed of huge files)
2) burst transfer rate will be switched off after given period of time in seconds, then it will revert to the standard throttle speed
3) burst transfer rate will not be activated at all, the download speed limit will be constant during the whole downloading process (in this case $config->burstLimit must be equal to the $config->rateLimit)
| |
Screenshots |
|
|
 January 2011
Number 2
Prize: One copy of DWebPro Standard License |
If too many users access a server to download files or other resources, the server may reach to the bandwidth usage limit and the access to the server may become too slow to all users.
A solution for this problem consists in throttling the download speed, i.e., limiting the speed by which the files are served to the users that are downloading them.
This class implements a clever download speed throttling approach controlled by PHP.
It consists in capturing the output of the download scripts into a buffer, flush the buffer at a rate that does not exceed a given limit by introducing eventual pauses if the file is served at a speed above the limit.
Manuel Lemos |
| Ratings | Utility |
Consistency |
Documentation |
Examples |
Tests |
Videos |
Overall |
Rank |
| All time: |
Good (95.0%) |
Good (95.0%) |
- |
Good (90.0%) |
- |
- |
Sufficient (66.0%) |
409 |
| Month: |
Not yet rated by the users |
| |
Applications that use this class |
|
|
No application links were specified for this class.

If you know an application of this package, send a message to the
author to add a link here.
| |
Files |
|
|