Speed Test

Speed test with 100KB
"; echo "Speed test with 512KB
"; echo "Speed test with 1024KB
"; echo "Speed test with 5000KB
"; } if($_GET['do'] == 'test') { $_size = $_GET['size']; if(($_size == '100') || ($_size == '512') || ($_size == '1024') || ($_size == '5000')) { $numKB = $_size*1024; function getmicrotime() { list($usec, $sec) = explode(" ", microtime()); return ((float)$usec + (float)$sec); } flush(); $timeStart = getmicrotime(); $nlLength = strlen("
"); for ($i = 0; $i < $numKB; $i++) { $string = str_pad('', 1024 - $nlLength, '/*\\*') . "
"; flush(); } $timeEnd = getmicrotime(); $timeDiff = round($timeEnd - $timeStart, 1); echo "
Transferred " . $numKB/1024 . " KB in {$timeDiff} seconds. Test Again
"; } else { echo "Sorry, please pick a valid size.Go back
"; } } ?>