From a35e3e67ef4f11757bed8545bef5745b150da2ef Mon Sep 17 00:00:00 2001 From: Stricted Date: Sun, 28 Jun 2015 08:37:48 +0200 Subject: [PATCH] add getMissedCalls --- speedport.class.php | 18 ++++++++++++++++++ tests/missedcalls.php | 4 ++++ 2 files changed, 22 insertions(+) create mode 100644 tests/missedcalls.php diff --git a/speedport.class.php b/speedport.class.php index d54dd21..fe2b8ae 100644 --- a/speedport.class.php +++ b/speedport.class.php @@ -201,6 +201,24 @@ class speedport { return explode("\n", $data['body']); } + /** + * get the Missed Calls from router + * + * @return array + */ + public function getMissedCalls() { + $path = 'data/Syslog.json'; + $fields = array('exporttype' => '1'); + $cookie = 'challengev='.$this->challenge.'; '.$this->session; + $data = $this->sentRequest($path, $fields, $cookie); + + if (empty($data['body'])) { + throw new Exception('unable to get syslog data'); + } + + return explode("\n", $data['body']); + } + /** * sends the request to router * diff --git a/tests/missedcalls.php b/tests/missedcalls.php new file mode 100644 index 0000000..6aedb33 --- /dev/null +++ b/tests/missedcalls.php @@ -0,0 +1,4 @@ +getMissedCalls()); +$sp->logout(); -- 2.20.1