--- /dev/null
+language: php
+php:
+ - 5.3
+ - 5.4
+ - 5.5
+ - 5.6
+ - nightly
+allow_failures:
+ - php: nightly
+before_install:
+ - pear install pear/PHP_CodeSniffer
+ - phpenv rehash
+before_script:
+ - git clone --branch=master --depth=1 --quiet git://github.com/WoltLab/WCF.git WCF
+script:
+ - find . -type f -name '*.php' -not -path "./WCF/*" |xargs -I file php -l file > /dev/null
+ - phpcs -p --extensions=php --standard="`pwd`/WCF/CodeSniff/WCF" --ignore="CryptLib/" --ignore="WCF/" .
\ No newline at end of file
-## speedport hybrid php api
+### speedport hybrid php api
+
+[![Build Status](https://travis-ci.org/Stricted/speedport-hybrid-php-api.svg)](https://travis-ci.org/Stricted/speedport-hybrid-php-api)
Access Speedport Hybrid Router through PHP
+**THIS CLASS IS ONLY FOR SPEEDPORT HYBRID**
+
### License
---
-This project is licensed under [GNU LESSER GENERAL PUBLIC LICENSE Version 3](https://github.com/Stricted/speedport-hybrid-php-api/blob/master/LICENSE).
\ No newline at end of file
+This project is licensed under [GNU LESSER GENERAL PUBLIC LICENSE Version 3](https://github.com/Stricted/speedport-hybrid-php-api/blob/master/LICENSE).
+
+known valid paths for getData() :
+ * /data/dsl.json
+ * /data/interfaces.json
+ * /data/arp.json
+ * /data/session.json
+ * /data/dhcp_client.json
+ * /data/dhcp_server.json
+ * /data/ipv6.json
+ * /data/dns.json
+ * /data/routing.json
+ * /data/igmp_proxy.json
+ * /data/igmp_snooping.json
+ * /data/wlan.json
+ * /data/module.json
+ * /data/memory.json
+ * /data/speed.json
+ * /data/webdav.json
+ * /data/bonding_client.json
+ * /data/bonding_tunnel.json
+ * /data/filterlist.json
+ * /data/bonding_tr181.json
+ * /data/letinfo.json
+ * /data/Status.json
\ No newline at end of file
/**
* return the given json as array
*
- * the following paths are known to be valid:
- * /data/dsl.json
- * /data/interfaces.json
- * /data/arp.json
- * /data/session.json
- * /data/dhcp_client.json
- * /data/dhcp_server.json
- * /data/ipv6.json
- * /data/dns.json
- * /data/routing.json
- * /data/igmp_proxy.json
- * /data/igmp_snooping.json
- * /data/wlan.json
- * /data/module.json
- * /data/memory.json
- * /data/speed.json
- * /data/webdav.json
- * /data/bonding_client.json
- * /data/bonding_tunnel.json
- * /data/filterlist.json
- * /data/bonding_tr181.json
- * /data/letinfo.json
- *
- * /data/Status.json (No login needed)
- *
* @param string $file
* @return array
*/
return $json;
}
- /*
- // i dont want test this :D, feel free to test it and report if it works or not
+ /**
+ * reset the router to Factory Default
+ * not tested
+ *
+ * @return array
+ */
public function resetToFactoryDefault () {
$path = 'data/resetAllSetting.json';
$fields = array('csrf_token' => 'nulltoken', 'showpw' => 0, 'password' => $this->hash, 'reset_all' => 'true');
return $json;
}
- */
+
/**
* check if firmware is actual
$headers = array();
$header_text = substr($response, 0, strpos($response, "\r\n\r\n"));
- foreach (explode("\r\n", $header_text) as $i => $line) {
+ $header_text = explode("\r\n", $header_text);
+ foreach ($header_text as $i => $line) {
if ($i === 0) {
$headers['http_code'] = $line;
}
return $headers;
}
-}
\ No newline at end of file
+}