HttpResponse supports a basic throttling mechanism
HttpResponse supports a basic throttling mechanism, which is enabled by
setting a throttle delay and a buffer size. PHP will sleep the specified
amount of seconds after each sent chunk of specified bytes.
<?php
// send 5000 bytes every 0.2 seconds, i.e. max ~25kByte/s
HttpResponse::setThrottleDelay(0.2);
HttpResponse::setBufferSize(5000);
HttpResponse::setCache(true);
HttpResponse::setContentType('application/x-zip');
HttpResponse::setFile('../archive.zip');
HttpResponse::send();
?>