private function exportData ($type) {
if ($this->checkLogin() !== true) throw new Exception('you musst be logged in to use this method');
- $path = 'data/ExportDialedCalls.json';
+ $path = 'data/Syslog.json';
$fields = array('exporttype' => $type);
$data = $this->sentRequest($path, $fields, true);
--- /dev/null
+<?php
+require_once('../SpeedportHybrid.class.php');
+/**
+ * @author Jan Altensen (Stricted)
+ * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
+ * @copyright 2015 Jan Altensen (Stricted)
+ */
+class Data extends SpeedportHybrid {
+ public function getDSL () {
+ return $this->getData('data/dsl.json');
+ }
+
+ public function getInterfaces () {
+ return $this->getData('data/interfaces.json');
+ }
+
+ public function getArp () {
+ return $this->getData('data/arp.json');
+ }
+
+ public function getSession () {
+ return $this->getData('data/session.json');
+ }
+
+ public function getDHCPClient () {
+ return $this->getData('data/dhcp_client.json');
+ }
+
+ public function getDHCPServer () {
+ return $this->getData('data/dhcp_server.json');
+ }
+
+ public function getIPv6 () {
+ return $this->getData('data/ipv6.json');
+ }
+
+ public function getDNS () {
+ return $this->getData('data/dns.json');
+ }
+
+ public function getRouting () {
+ return $this->getData('data/routing.json');
+ }
+
+ public function getIGMPProxy () {
+ return $this->getData('data/igmp_proxy.json');
+ }
+
+ public function getIGMPSnooping () {
+ return $this->getData('data/igmp_snooping.json');
+ }
+
+ public function getWLAN () {
+ return $this->getData('data/wlan.json');
+ }
+
+ public function getModule () {
+ return $this->getData('data/module.json');
+ }
+
+ public function getMemory () {
+ return $this->getData('data/memory.json');
+ }
+
+ public function getSpeed () {
+ return $this->getData('data/speed.json');
+ }
+
+ public function getWebDAV () {
+ return $this->getData('data/webdav.json');
+ }
+
+ public function getBondingClient () {
+ return $this->getData('data/bonding_client.json');
+ }
+
+ public function getBondingTunnel () {
+ return $this->getData('data/bonding_tunnel.json');
+ }
+
+ public function getFilterList () {
+ return $this->getData('data/filterlist.json');
+ }
+
+ public function getBondingTR181 () {
+ return $this->getData('data/bonding_tr181.json');
+ }
+
+ public function getLTEInfo () {
+ return $this->getData('data/letinfo.json');
+ }
+
+ public function getStatus () {
+ return $this->getData('data/Status.json');
+ }
+}
<?php
require_once('config.php');
-print_r($sp->getData('arp'));
+print_r($sp->getArp());
$sp->logout();
<?php
require_once('config.php');
-print_r($sp->getData('bonding_client'));
+print_r($sp->getBondingClient());
$sp->logout();
<?php
require_once('config.php');
-print_r($sp->getData('bonding_tr181'));
+print_r($sp->getBondingTR181());
$sp->logout();
<?php
require_once('config.php');
-print_r($sp->getData('bonding_tunnel'));
+print_r($sp->getBondingTunnel());
$sp->logout();
<?php
require_once('config.php');
-print_r($sp->getData('dhcp_client'));
+print_r($sp->getDHCPClient());
$sp->logout();
<?php
require_once('config.php');
-print_r($sp->getData('dhcp_server'));
+print_r($sp->getDHCPServer());
$sp->logout();
<?php
require_once('config.php');
-print_r($sp->getData('dns'));
+print_r($sp->getDNS());
$sp->logout();
<?php
require_once('config.php');
-print_r($sp->getData('dsl'));
+print_r($sp->getDSL());
$sp->logout();
<?php
-require_once('../SpeedportHybrid.class.php');
+require_once('Data.class.php');
$password = 'your_router_password';
$url = 'http://speedport.ip/';
-$sp = new SpeedportHybrid($url);
+$sp = new Data($url);
$sp->login($password);
<?php
require_once('config.php');
-print_r($sp->getData('filterlist'));
+print_r($sp->getFilterList());
$sp->logout();
<?php
require_once('config.php');
-print_r($sp->getData('igmp_proxy'));
+print_r($sp->getIGMPProxy());
$sp->logout();
<?php
require_once('config.php');
-print_r($sp->getData('igmp_snooping'));
+print_r($sp->getIGMPSnooping());
$sp->logout();
<?php
require_once('config.php');
-print_r($sp->getData('interfaces'));
+print_r($sp->getInterfaces());
$sp->logout();
<?php
require_once('config.php');
-print_r($sp->getData('ipv6'));
+print_r($sp->getIPv6());
$sp->logout();
<?php
require_once('config.php');
-print_r($sp->getData('lteinfo'));
+print_r($sp->getInterfaces());
$sp->logout();
<?php
require_once('config.php');
-print_r($sp->getData('memory'));
+print_r($sp->getMemory());
$sp->logout();
<?php
require_once('config.php');
-print_r($sp->getData('module'));
+print_r($sp->getModule());
$sp->logout();
<?php
require_once('config.php');
-print_r($sp->getData('routing'));
+print_r($sp->getRouting());
$sp->logout();
<?php
require_once('config.php');
-print_r($sp->getData('session'));
+print_r($sp->getSession());
$sp->logout();
<?php
require_once('config.php');
-print_r($sp->getData('speed'));
+print_r($sp->getSpeed());
$sp->logout();
<?php
require_once('config.php');
-print_r($sp->getData('status'));
+print_r($sp->getStatus());
$sp->logout();
<?php
require_once('config.php');
-print_r($sp->getData('webdav'));
+print_r($sp->getWebDAV());
$sp->logout();
<?php
require_once('config.php');
-print_r($sp->getData('wlan'));
+print_r($sp->getWLAN());
$sp->logout();