PHP code example of walangkaji / ztef
1. Go to this page and download the library: Download walangkaji/ztef 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/ */
walangkaji / ztef example snippets
teF\Exception\LoginException;
use ZteF\ZteF;
try {
$zte = new ZteF('192.168.1.1', 'admin', 'Telkomdso123', true);
// Get status
$status = $zte->status()->deviceInformation();
var_dump($status);
// Reboot device
// $reboot = $zte->administration()->systemManagement()->reboot();
// var_dump($reboot);
} catch (LoginException $e) {
echo $e->getMessage() . \PHP_EOL;
} catch (\Exception $e) {
echo $e->getMessage() . \PHP_EOL;
}
// Terusno dewe