-
Notifications
You must be signed in to change notification settings - Fork 0
/
testclass.php
24 lines (19 loc) · 1.22 KB
/
testclass.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<?php
// use the CLI command : php testclass.php
include 'huawei.class.php';
$HU = new huawei("192.168.8.1");
if ($HU->login("UserID", "Password")==FALSE) { echo $HU->LastError. "!\n"; die(); }
// activate one, or more, functions that you want to try
//if ($HU->reboot()==FALSE) echo $HU->LastError. "!\n"; die();
//if ($ret=$HU->DeviceInformation()) echo $ret."\n"; else { echo $HU->LastError. "!\n"; die(); }
//if ($ret=$HU->CurrentPlmn()) echo $ret."\n"; else { echo $HU->LastError. "!\n"; die(); }
//if ($ret=$HU->TrafficStatistics()) echo $ret."\n"; else { echo $HU->LastError. "!\n"; die(); }
//if ($ret=$HU->ListSmsIn()) echo $ret."\n"; else { echo $HU->LastError. "!\n"; die(); }
//if ($ret=$HU->ListSmsOut()) echo $ret."\n"; else { echo $HU->LastError. "!\n"; die(); }
//if ($ret=$HU->SmsCount()) echo $ret."\n"; else { echo $HU->LastError. "!\n"; die(); }
if ($ret=$HU->Status()) echo $ret."\n"; else { echo $HU->LastError. "!\n"; die(); }
//if ($HU->SendSms("1234567890", "SMS sent via php class")==FALSE) { echo $HU->LastError. "!\n"; die(); }
if ($HU->logout() == FALSE) { echo $HU->LastError. "!\n"; die(); }
echo "\n\nall OK !\n";
$HU=NULL;
?>