This quickly and effectly uses the speedtest.net servers to test your server's internet bandwidth connection. Check to see if you're really getting what your provider says you should get!
Features:
- Speed test your server within 30 seconds
- Uses the connection from speedtest.net
- NO buttons to click, auto runs on page and live updates to show the speed
- Detects and uses the server closest to your server's geolocation
Latest Version: 1.1a
Add this line to:
/usr/local/cwpsrv/htdocs/resources/admin/include/3rdparty.php
<li><a href="index.php?module=speedtest"><span class="icon16 icomoon-icon-arrow-right-3"></span>Speed Test</a></li>
Then create a new file called "speedtest.php" on:
/usr/local/cwpsrv/htdocs/resources/admin/modules
with this content:
<center><h3>Speed test your server's internet connection</h3><h2>Verison 1.1a</h2><br>
Python file provided by Speedtest.net<br>
<button type="button" class="btn btn-warning" onclick='window.location.reload(true);'>Restart Test</button>
<a href="http://forum.centos-webpanel.com/new-modules/(module)-speedtest-your-server-in-30-seconds/" target="_blank"><button type="button" class="btn btn-primary">Check for Update</button></a><br><br></center>
<pre>
<?php
$command = "python /usr/local/cwpsrv/htdocs/resources/admin/modules/speedtest/speedtest.py 2>&1";
$pid = popen( $command,"r");
while( !feof( $pid ) )
{
echo fread($pid, 256);
flush();
ob_flush();
usleep(100000);
}
pclose($pid);
?>
</pre>
Then run this command from your Terminal/SSH Window (You can copy and paste this; Do the last empty line too
)
mkdir /usr/local/cwpsrv/htdocs/resources/admin/modules/speedtest
cd /usr/local/cwpsrv/htdocs/resources/admin/modules/speedtest
wget -O speedtest.py https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py
chmod 755 speedtest-cli.py
chmod +x speedtest-cli.py
echo Complete!
Now just load the page Developer Menu -> Speedtest from the sidebar and you will begin the speed test.
Which will be /index.php?module=speedtest