The Little Guy Posted July 19, 2010 Share Posted July 19, 2010 I found this piece of code: <?php $kb=512; echo "streaming $kb Kb...<!-"; flush(); $time = explode(" ",microtime()); $start = $time[0] + $time[1]; for($x=0;$x<$kb;$x++){ echo str_pad('', 1024, '.'); flush(); } $time = explode(" ",microtime()); $finish = $time[0] + $time[1]; $deltat = $finish - $start; echo "-> Test finished in $deltat seconds. Your speed is ". round($kb / $deltat, 3)."Kb/s"; ?> It says it can tell a users connection speed. How accurate do you think it is? Link to comment https://forums.phpfreaks.com/topic/208213-connection-speed/ Share on other sites More sharing options...
AbraCadaver Posted July 19, 2010 Share Posted July 19, 2010 Not accurate at all. It doesn't measure anything other than how long it takes the server to execute that loop. Link to comment https://forums.phpfreaks.com/topic/208213-connection-speed/#findComment-1088291 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.