3 $mimeType = $_GET['mimeType'];
4 $sleepTime = $_GET['sleep'];
5 $size = filesize($name);
7 usleep($sleepTime*1000);
9 header('Content-Type: ' . $mimeType);
10 header('Content-Length: ' . $size);
11 if (isset($_GET['expires']))
12 header('Cache-control: max-age=0');
14 header('Cache-control: max-age=86400');
16 $output = fopen("php://output", 'r+');
17 $file = fopen($name, "rb");
18 $buffer = fread($file, 16);
19 fwrite($output, $buffer, 16);
23 usleep($sleepTime*1000);
25 $buffer = fread($file, $size - 16);
26 fwrite($output, $buffer, $size - 16);