PHP code example of walangkaji / zte-f609-api
1. Go to this page and download the library: Download walangkaji/zte-f609-api 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 / zte-f609-api example snippets
use walangkaji\ZteF609\ZteApi;
$ipModem = '192.168.1.1';
$username = 'admin';
$password = 'password';
$debug = false;
$zteF609 = new ZteApi($ipModem, $username, $password, $debug);
$login = $zteF609->login();
var_dump($login);
// Terusno dewe
$ipModem = '192.168.1.1';
$username = 'admin';
$password = 'password';
$debug = false;
$proxy = 'xxx.xxx.xxx.xxx:xxxx'
$zteF609 = new ZteApi($ipModem, $username, $password, $debug, $proxy);
$login = $zteF609->login();
var_dump($login);
// Terusno dewe
$zteF609 = new ZteApi($ipModem, $username, $password);
$login = $zteF609->login();
if (!$login) {
echo 'Login gagal' . PHP_EOL;
exit();
}
$reboot = $zteF609->reboot();
if ($reboot) {
echo 'Berhasil reboot modem.' . PHP_EOL;
}
$zteF609 = new ZteApi($ipModem, $username, $password);
$login = $zteF609->login();
$info = $zteF609->status->deviceInformation();
var_dump($info);
$zteF609 = new ZteApi($ipModem, $username, $password);
$login = $zteF609->login();
$info = $zteF609->status->NetworkInterface->ponInformation();
var_dump($info);
$zteF609->login();
$zteF609->reboot();
$zteF609->status->deviceInformation();
$zteF609->status->voIpStatus();
$zteF609->status->NetworkInterface->wanConnection();
$zteF609->status->NetworkInterface->wanConnection3Gor4G();
$zteF609->status->NetworkInterface->tunnelConnection4in6();
$zteF609->status->NetworkInterface->tunnelConnection6in4();
$zteF609->status->NetworkInterface->ponInformation();
$zteF609->status->NetworkInterface->mobileNetwork();
$zteF609->status->UserInterface->wlan();
$zteF609->status->UserInterface->ethernet();
$zteF609->status->UserInterface->usb();