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?
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";
?>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With