X-Git-Url: https://git.stricted.de/?p=GitHub%2FStricted%2Fspeedport-hybrid-php-api.git;a=blobdiff_plain;f=speedport.class.php;fp=speedport.class.php;h=6facff61ed6f354621f698eec1e9f4866adb8d6b;hp=fe2b8aebc6a70956273680a978d7187769728899;hb=15260eebf34ac18f1a11824f108e6621ad5e4ed5;hpb=a35e3e67ef4f11757bed8545bef5745b150da2ef diff --git a/speedport.class.php b/speedport.class.php index fe2b8ae..6facff6 100644 --- a/speedport.class.php +++ b/speedport.class.php @@ -219,6 +219,24 @@ class speedport { return explode("\n", $data['body']); } + /** + * get the Taken Calls from router + * + * @return array + */ + public function getTakenCalls() { + $path = 'data/Syslog.json'; + $fields = array('exporttype' => '2'); + $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 *