Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to check my server's upload and download speed? [closed]

I bought a server and I need to check it's internet connection (speed).

Is there an easy way to do that?

I googled but I couldn't find anything...

I did this:

<?php

$link = 'http://speed.bezeqint.net/big.zip';
$start = time();
$size = filesize($link);
$file = file_get_contents($link);
$end = time();

$time = $end - $start;

$speed = $size / $time;

echo "Server's speed is: $speed MB/s";


?>

Is it correct?

like image 580
HTMHell Avatar asked Jul 01 '12 16:07

HTMHell


1 Answers

Try:

<?php

$link = 'http://speed.bezeqint.net/big.zip';
$start = time();
$size = filesize($link);
$file = file_get_contents($link);
$end = time();

$time = $end - $start;

$size = $size / 1048576;

$speed = $size / $time;

echo "Server's speed is: $speed MB/s";


?>
like image 183
lauriys Avatar answered Sep 21 '22 06:09

lauriys