$url .= $data['sys'] . ','; $url .= $data['idle'] . ','; $url .= $data['iowait']; $url .= '&chdl=User|Nice|Sys|Idle|Iowait&chdlp=b&chl='; $url .= $data['user'] . '%25|'; $url .= $data['nice'] . '%25|'; $url .= $data['sys'] . '%25|'; $url .= $data['idle'] . '%25|'; $url .= $data['iowait'] . '%25'; $url .= '&chtt=Core+' . $title; return $api . base64_encode($url); } if ($_GET['act'] == "cpu_percentage") { echo "<center><b><font face='Microsoft YaHei' color='#666666' size='3'>图片加载慢,请耐心等待!</font></b><br /><br />"; foreach ($data as $k => $v) { echo '<img src="' . makeImageUrl($k, $v) . '" style="width:360px;height:240px;border: #CCCCCC 1px solid;background: #FFFFFF;margin:5px;padding:5px;" />'; } echo "</center>"; exit; } // 根据不同系统取得CPU相关信息 switch (PHP_OS) { case "Linux": $sysReShow = false !== ($sysInfo = sys_linux()) ? "show" : "none"; break; case "FreeBSD": $sysReShow = false !== ($sysInfo = sys_freebsd()) ? "show" : "none"; break; /* case "WINNT":
} elseif($_GET['speed']=="0") { $speed=6666.67; } elseif(isset($_GET['speed']) and $_GET['speed']>0) { $speed=round(100/($_GET['speed']/1000),2); //下载速度:$speed kb/s } else { $speed="<font color=\"red\"> 未探测 </font>"; } // 检测函数支持 function isfun($funName = '') { if (!$funName || trim($funName) == '' || preg_match('~[^a-z0-9\_]+~i', $funName, $tmp)) return '错误'; return (false !== function_exists($funName)) ? '<font color="green">√</font>' : '<font color="red">×</font>'; } function isfun1($funName = '') { if (!$funName || trim($funName) == '' || preg_match('~[^a-z0-9\_]+~i', $funName, $tmp)) return '错误'; return (false !== function_exists($funName)) ? '√' : '×'; }