From: Stricted Date: Sun, 28 Jun 2015 07:21:37 +0000 (+0200) Subject: remove debug code X-Git-Tag: 1.0.0~14 X-Git-Url: https://git.stricted.de/?p=GitHub%2FStricted%2Fspeedport-hybrid-php-api.git;a=commitdiff_plain;h=9bd25bb448725e3d09c9fdb2d6d0f0bc3fc71516 remove debug code --- diff --git a/speedport.class.php b/speedport.class.php index 90f5c32..1650c5b 100644 --- a/speedport.class.php +++ b/speedport.class.php @@ -247,7 +247,7 @@ class speedport { $fields = array('exporttype' => '3'); $cookie = 'challengev='.$this->challenge.'; '.$this->session; $data = $this->sentRequest($path, $fields, $cookie); - print_r($data); + if (empty($data['body'])) { throw new Exception('unable to get syslog data'); } @@ -255,6 +255,18 @@ class speedport { return explode("\n", $data['body']); } + /* + public function resetToFactoryDefault () { + $path = 'data/resetAllSetting.json'; + $fields = array('csrf_token' => 'nulltoken', 'showpw' => 0, 'password' => $this->hash, 'reset_all' => 'true'); + $cookie = 'challengev='.$this->challenge.'; '.$this->session; + $data = $this->sentRequest($path, $fields, $cookie); + $json = json_decode($data['body'], true); + + return $json; + } + */ + /** * check if firmware is actual *