Author Topic: [module] Speedtest your server in 30 seconds  (Read 21532 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
[module] Speedtest your server in 30 seconds
« on: January 06, 2016, 08:30:37 PM »
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

Quote
<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:
Quote
<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 ;) )
Quote
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
« Last Edit: December 26, 2016, 02:07:14 PM by bentheman96 »
Trying to help people :)
Chords and Lyrics

Offline
**
Re: [module] Speedtest your server in 30 seconds
« Reply #1 on: April 13, 2016, 09:01:29 PM »
Thanks mate, well done :)

Offline
***
Re: [module] Speedtest your server in 30 seconds
« Reply #2 on: April 14, 2016, 01:37:23 AM »
thanks bentheman96 , awesome

Offline
*
Re: [module] Speedtest your server in 30 seconds
« Reply #3 on: December 26, 2016, 02:08:54 PM »
Updated to 1.1a

* Updated github speedtest.py new link.
Trying to help people :)
Chords and Lyrics

Offline
*
Re: [module] Speedtest your server in 30 seconds
« Reply #4 on: January 23, 2017, 02:55:38 PM »
Hi,

This file is not available in newer version
/usr/local/cwpsrv/htdocs/resources/admin/include/3rdparty.php all another files are encryped

Offline
*
Re: [module] Speedtest your server in 30 seconds
« Reply #5 on: February 25, 2017, 04:08:39 PM »
What a shame. People spend time making modules to share and then files get encrypted and end users cannot use. As a new user (pro) makes me think twice about creating modules...

Offline
*
Re: [module] Speedtest your server in 30 seconds
« Reply #6 on: May 02, 2017, 06:53:44 PM »
Sadly I can't modify my first post  :-\  ???

But for the 3rdparty.php; it still works. You just need to create it  ;)
From SSH you can simply CD into /usr/local/cwpsrv/htdocs/resources/admin/include and do "touch 3rdparty.php" command

Then follow the steps above with normal modules. So modules and 3rdparty support still work.
Trying to help people :)
Chords and Lyrics

Offline
**
Re: [module] Speedtest your server in 30 seconds
« Reply #7 on: September 06, 2017, 07:49:48 AM »
Thanks, it works

Offline
*
Re: [module] Speedtest your server in 30 seconds
« Reply #8 on: September 06, 2017, 08:02:15 AM »
What a shame. People spend time making modules to share and then files get encrypted and end users cannot use. As a new user (pro) makes me think twice about creating modules...

how would you files got encrypted that is not possible???? since encryption can be done only by software developer so any custom script you have can't be encrypted in any way.
VPS & Dedicated server provider with included FREE Managed support for CWP.
http://www.studio4host.com/

*** Don't allow that your server or website is down, choose hosting provider with included expert managed support for your CWP.

Offline
*
Re: [module] Speedtest your server in 30 seconds
« Reply #9 on: July 15, 2020, 05:32:16 PM »
This still works  :D

« Last Edit: July 15, 2020, 05:37:52 PM by MyBuddyBen »
Trying to help people :)
Chords and Lyrics