PHP code example of jjeanniard / infoserver
1. Go to this page and download the library: Download jjeanniard/infoserver library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
jjeanniard / infoserver example snippets
seclib/phpseclib
use phpseclib\Net\SSH2;
use jjeanniard\InfoServer;
$ssh = new SSH2('localhost', 'port');
if (!$ssh->login('username', 'password')) {
echo('Login Failed');
}
$dataServ = new InfoServer($ssh);
$dataServ->getCpu();
text
* getSystem()
* getCpu()
* getRam()
* getSwap()
* getLoadAverage()
* getReseau()
* getDisk()
* getUptime()