Measure UPLOAD speed
Posted: Thu Feb 05, 2009 8:17 am
How can i measure a user UPLOAD speed ...
i have this script, who can measure only download speed, but what i really need is to know the UPLOAD speed, is there a way to do that ?
many thanks !!
pd. i don't know much about php, i'm a Java programmer, so please be nice with me
i have this script, who can measure only download speed, but what i really need is to know the UPLOAD speed, is there a way to do that ?
Code: Select all
<?php
$kb=2048;
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";
?>
pd. i don't know much about php, i'm a Java programmer, so please be nice with me