Limit File Download Speed with PHP
This PHP code will limit the download rate for a file being downloaded by a client. This is useful if you are streaming MP3s from your site and you are trying to distribute your bandwidth as evenly as possible.
For example: If you are streaming MP3s with a bitrate of 96kb then you would at the minimum only need to send 12KB/s of data to the client. Now to be safe I would send around 16KB/s to allow some buffering just in case some packets get held up somewhere.
Code
PHP:
-
<?php
-
-
$file = "/path/to/file/test.mp3"; // path to file
-
$speed = 16; // 16 kb/s download rate limit
-
-
-
-
}
-
-
-
?>

My name is Noah Everett. I live in Tulsa, OK. I started 
[...] http://www.findmotive.com/2007/11/01/limit-file-download-speed-with-php/ [...]