<?php
/**
-* HTML parsing for the linksys router HTML pages
-*
-* PHP version 5
-*
-* @category Tools
-* @package linksys-wrt3g-tools
-* @author Christian Weiske <cweiske@cweiske.de>
-* @license AGPL v3
-* @link http://cweiske.de/linksys-wrt3g-tools.htm
-*/
+ * HTML parsing for the linksys router HTML pages
+ *
+ * PHP version 5
+ *
+ * @category Tools
+ * @package linksys-wrt3g-tools
+ * @author Christian Weiske <cweiske@cweiske.de>
+ * @license AGPL v3
+ * @link http://cweiske.de/linksys-wrt3g-tools.htm
+ */
class Wrt3g_HtmlParser
{
protected static $arTranslations = array(
/**
- * Parses the body of /index_wstatus1.asp and returns extracted values.
- *
- * @param string $body HTML document to parse
- *
- * @return array Array of key-value pairs
- */
+ * Parses the body of /index_wstatus1.asp and returns extracted values.
+ *
+ * @param string $body HTML document to parse
+ *
+ * @return array Array of key-value pairs, probably with "type", "network" and
+ * "signal strength"
+ */
public function index_wstatus1($body)
{
$doc = new DomDocument();
/**
- * Parses the body of /index_wstatus2.asp and returns extracted values.
- *
- * @param string $body HTML document to parse
- *
- * @return array Array with "connection" as key and one of "connecting",
- * "connected" or "disconnected" as value.
- */
+ * Parses the body of /index_wstatus2.asp and returns extracted values.
+ *
+ * @param string $body HTML document to parse
+ *
+ * @return array Array with "connection" as key and one of "connecting",
+ * "connected" or "disconnected" as value.
+ */
public function index_wstatus2($body)
{
preg_match('/var status2 = "(.+)"/', $body, $arMatches);
//Connected
return array('connection' => strtolower($strStatus));
}
+
+
+
+ /**
+ * Parses the HTML body of /Status_NoAuth.asp and returns the extracted
+ * values.
+ *
+ * @param string $body HTML document to parse
+ *
+ * @return array FIXME
+ */
+ public function status_noauth($body)
+ {
+ }
}
\ No newline at end of file