+ $url = $strUrlBase . '/Status_NoAuth.asp';
+ $this->log('Connecting to ' . $url, 1);
+
+ $r = new $this->requestClass();
+ $r->setMethod(HTTP_Request2::METHOD_GET);
+ $r->setUrl($url);
+ $resp = $r->send();
+ $this->log($resp->getStatus() . ' ' . $resp->getReasonPhrase(), 1);
+ //FIXME: check status
+
+ $parser = new Wrt3g_HtmlParser();
+
+ return $parser->status_noauth(
+ $resp->getBody()
+ );
+ }
+
+
+
+ /**
+ * Retrieves pc card/SIM status information
+ *
+ * @return array Array with several key-value pairs
+ * connection => connecting, disconnected, connected
+ *
+ * @throws Exception When the router can't be reached
+ */
+ public function getCardStatus()
+ {
+ $arRetval = $this->loadStatus_NoAuth();
+
+ return array_intersect_key(
+ $arRetval,
+ array(
+ 'card model' => 0,
+ 'card revision' => 0,
+ 'card firmware' => 0,
+ 'IMSI' => 0
+ )
+ );
+ }
+
+
+
+ /**
+ * Retrieves all status information one can get.
+ *
+ * @return array Array with several key-value pairs
+ * connection => connecting, disconnected, connected
+ *
+ * @throws Exception When the router can't be reached
+ */
+ public function getFullStatus()
+ {
+ return $this->loadStatus_NoAuth();
+ }
+
+
+
+ /**
+ * Log a message to stdout.
+ *
+ * @param string $msg Message to display
+ * @param integer $level Log level, see $verbosity
+ *
+ * @return void
+ */
+ public function log($msg, $level = 1)
+ {
+ if ($this->verbosity >= $level) {
+ echo $msg . "\n";
+ }