From: Stricted Date: Sun, 26 Jul 2015 16:33:35 +0000 (+0200) Subject: add unstable function changeLTEStatus X-Git-Tag: 1.0.4~8 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=655c9abd0f1732299feec91cda01ec83032278cf;p=GitHub%2FStricted%2Fspeedport-hybrid-php-api.git add unstable function changeLTEStatus --- diff --git a/SpeedportHybrid.class.php b/SpeedportHybrid.class.php index c9b2dd2..758385e 100644 --- a/SpeedportHybrid.class.php +++ b/SpeedportHybrid.class.php @@ -194,7 +194,7 @@ class SpeedportHybrid { * @param string $status * @return boolean */ - public function changeConnectionStatus ($status) { + public function changeDSLStatus ($status) { $this->checkLogin(); $path = 'data/Connect.json'; @@ -216,6 +216,31 @@ class SpeedportHybrid { } } + /** + * change lte connection status + * + * @param string $status + * @return boolean + */ + public function changeLTEStatus ($status) { + throw new Exception('unstable funtion'); + $path = 'data/Modules.json'; + + if ($status == '0' || $status == '1' || $status == 'yes' || $status == 'no') { + if ($status == 'yes') $status = '1'; + else if ($status == 'no') $status = '0'; + + $fields = array('csrf_token' => $this->token, 'use_lte' => $status); + $data = $this->sentEncryptedRequest($path, $fields, true); + + // debug only + return $data; + } + else { + throw new RouterException('unknown status'); + } + } + /** * get uptime based on online (connection) time *