* @license AGPL v3 * @link http://cweiske.de/linksys-wrt3g-tools.htm */ class Wrt3g_HtmlParser { protected static $arTranslations = array( 'GPRS_MSG.WWBEAR' => 'type', 'GPRS_MSG.NNAME' => 'network', 'GPRS_MSG.STRENGTH' => 'signal strength', 'GPRS_MSG.ACQUIRING' => 'aquiring', 'GPRS_MSG.WWBEAR_GPRS' => 'GPRS', 'GPRS_MSG.WWBEAR_UMTS' => 'UMTS', ); /** * 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 */ public function index_wstatus1($body) { $arRetval = array(); $arMatches = array(); preg_match_all('#>Capture\(([^)]+)\) strtolower($strStatus)); } }