(.*?)<\/table>/s', $data, $table);preg_match_all('/(.*?)<\/tr>/s', $table[1][0], $tr);for($i=0;$i(.*?)<\/td>/s', $tr[0][$i], $td[$i]);$td[$i] = $td[$i][2];}$html = "\$huanhui['uptime'] = '".date("Y-m-d H:i:s")."';\r\n";//echo $html;$need = array(1,3,6,7,8,10,12,15,19,17,22);for($i=0;$i$v) { if(!in_array($i,$need))continue; //echo $v." --- "; $html.="\$huanhui['html']['".$i."']['".$k."'] = '".$v."';\r\n"; } //echo "
";}writetocache2('huilv', $html);function writetocache2($script, $cachedata, $prefix = 'cache_') { global $_G; //echo DISCUZ_ROOT; $dir = DISCUZ_ROOT.'./data/cache/'; if(!is_dir($dir)) { @mkdir($dir, 0777); } if($fp = @fopen("$dir$prefix$script.php", 'wb')) { fwrite($fp, ""); fclose($fp); } else { echo 'Can not write to cache files, please check directory ./data/ and ./data/cache/ .'; } }?>