带查看密码的php探针代码

发布时间:2019-08-11编辑:脚本学堂
分享一个php探针代码,带查看密码的php探针,用于研究php探针的实现方法很不错,有需要的朋友参考下。

一个加密版的php探针,不是把探针代码加密,是为探针增加一个查看密码,这样更安全。

本探针核心代码基于yahei.net探针(雅黑php探针),初次运行探针,需要独立查看密码:admin。
可在探针内修改$adminkey值为你的查看密码就可以了。

源文件从lnmp上的演示探针修改而来的,简单的加上一个密码验证。

因为觉得探针没有密码,每次看后都要删除,有些麻烦,所以自己为探针增加了密码功能。

php探针完整代码:
 

复制代码 代码示例:

<?php
$adminkey = "admin";
/*-----------------请在上面修改密码---------------- */

session_start();

if(@$_post['password'] == $adminkey){
  $_session['login'] = md5($adminkey);
}

if($_server['query_string'] == "logout"){
  $_session['login'] = "";
  header("location: " . $_server['php_self']);
  exit();
}

$html_login = <<<eof
<!doctype html>
<html>
<head>
<title>php探针登录_www.jb200.com</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<style>
div{text-align:center; margin:0 auto;}
#loginform{width:350px;height:100px;background-color:#f8f8ff;box-shadow: 1px 1px 1px #888888;}
</style>
</head>
<body>

<div id="loginform">
  <div style="color:#c5c1aa;height:35px;">登录</div>
  <div style="text-align:center; margin:0 auto;"><form action="" method="post">&nbsp;独立查看密码&nbsp;<input type="password" name="password" style="width:120px;"><input type="submit" value="登录"></form></div>

</div>

</body>
</html>

eof;
/* ----------------以上是登录页代码------------------- */

 


if(@$_session['login'] != md5($adminkey)){
  exit($html_login);
}

/* ----------------以上代码由lyt博客添加的------------------- */


/* ----------------本探针基于yahei.net探针------------------- */
error_reporting(0); //抑制所有错误信息
@header("content-type: text/html; charset=utf-8"); //语言强制
ob_start();

$title = "雅黑php探针";
$version = "v0.4.2"; //版本号

define('http_host', preg_replace('~^www.~i', '', $_server['http_host']));

$time_start = microtime_float();

function memory_usage()
{
 $memory  = ( ! function_exists('memory_get_usage')) ? '0' : round(memory_get_usage()/1024/1024, 2).'mb';
 return $memory;
}

// 计时
function microtime_float()
{
 $mtime = microtime();
 $mtime = explode(' ', $mtime);
 return $mtime[1] + $mtime[0];
}

//单位转换
function formatsize($size)
{
 $danwei=array(' b ',' k ',' m ',' g ',' t ');
 $allsize=array();
 $i=0;

 for($i = 0; $i <4; $i++)
 {
  if(floor($size/pow(1024,$i))==0){break;}
 }

 for($l = $i-1; $l >=0; $l--)
 {
  $allsize1[$l]=floor($size/pow(1024,$l));
  $allsize[$l]=$allsize1[$l]-$allsize1[$l+1]*1024;
 }

 $len=count($allsize);

 for($j = $len-1; $j >=0; $j--)
 {
  $strlen = 4-strlen($allsize[$j]);
  if($strlen==1)
   $allsize[$j] = "<font color='#ffffff'>0</font>".$allsize[$j];
  elseif($strlen==2)
   $allsize[$j] = "<font color='#ffffff'>00</font>".$allsize[$j];
  elseif($strlen==3)
   $allsize[$j] = "<font color='#ffffff'>000</font>".$allsize[$j];

  $fsize=$fsize.$allsize[$j].$danwei[$j];
 } 
 return $fsize;
}

function valid_email($str)
{
 return ( ! preg_match("/^([a-z0-9+_-]+)(.[a-z0-9+_-]+)*@([a-z0-9-]+.)+[a-z]{2,6}$/ix", $str)) ? false : true;
}

//检测php设置参数
function show($varname)
{
 switch($result = get_cfg_var($varname))
 {
  case 0:
   return '<font color="red">×</font>';
  break;
  
  case 1:
   return '<font color="green">√</font>';
  break;
  
  default:
   return $result;
  break;
 }
}


if ($_get['act'] == "phpinfo")
{
 phpinfo();
 exit();
}
elseif($_get['act'] == "function")
{
 $arr = get_defined_functions();
 function php()
 {
 }
 echo "<pre>";
 echo "这里显示系统所支持的所有函数,和自定义函数n";
 print_r($arr);
 echo "</pre>";
 exit();
}elseif($_get['act'] == "disable_functions")
{
 $disfuns=get_cfg_var("disable_functions");
 if(empty($disfuns))
 {
  $arr = '<font color=red>×</font>';
 }
 else
 {
  $arr = $disfuns;
 }
 function php()
 {
 }
 echo "<pre>";
 echo "这里显示系统被禁用的函数n";
 print_r($arr);
 echo "</pre>";
 exit();
}

//mysql检测
if ($_post['act'] == 'mysql检测')
{
 $host = isset($_post['host']) ? trim($_post['host']) : '';
 $port = isset($_post['port']) ? (int) $_post['port'] : '';
 $login = isset($_post['login']) ? trim($_post['login']) : '';
 $password = isset($_post['password']) ? trim($_post['password']) : '';
 $host = preg_match('~[^a-z0-9-.]+~i', $host) ? '' : $host;
 $port = intval($port) ? intval($port) : '';
 $login = preg_match('~[^a-z0-9_-]+~i', $login) ? '' : htmlspecialchars($login);
 $password = is_string($password) ? htmlspecialchars($password) : '';
}
elseif ($_post['act'] == '函数检测')
{
 $funre = "函数".$_post['funname']."支持状况检测结果:".isfun1($_post['funname']);
}
elseif ($_post['act'] == '邮件检测')
{
 $mailre = "邮件发送检测结果:发送";
 if($_server['server_port']==80){$mailcontent = "http://".$_server['server_name'].($_server['php_self'] ? $_server['php_self'] : $_server['script_name']);}
 else{$mailcontent = "http://".$_server['server_name'].":".$_server['server_port'].($_server['php_self'] ? $_server['php_self'] : $_server['script_name']);}
 $mailre .= (false !== @mail($_post["mailadd"], $mailcontent, "this is a test mail!nnhttp://lnmp.org")) ? "完成":"失败";

 
// 检测函数支持
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)) ? '√' : '×';
}

// 根据不同系统取得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":
  $sysreshow = (false !== ($sysinfo = sys_windows()))?"show":"none";
 break;
*/ 
 
 default:
 break;
}

//linux系统探测
function sys_linux()
{
    // cpu
    if (false === ($str = @file("/proc/cpuinfo"))) return false;
    $str = implode("", $str);
    @preg_match_all("/models+names{0,}:+s{0,}([ws)(@.-]+)([rn]+)/s", $str, $model);
    @preg_match_all("/cpus+mhzs{0,}:+s{0,}([d.]+)[rn]+/", $str, $mhz);
    @preg_match_all("/caches+sizes{0,}:+s{0,}([d.]+s{0,}[a-z]+[rn]+)/", $str, $cache);
    @preg_match_all("/bogomipss{0,}:+s{0,}([d.]+)[rn]+/", $str, $bogomips);
    if (false !== is_array($model[1]))
 {
        $res['cpu']['num'] = sizeof($model[1]);
  /*
        for($i = 0; $i < $res['cpu']['num']; $i++)
        {
            $res['cpu']['model'][] = $model[1][$i].'&nbsp;('.$mhz[1][$i].')';
            $res['cpu']['mhz'][] = $mhz[1][$i];
            $res['cpu']['cache'][] = $cache[1][$i];
            $res['cpu']['bogomips'][] = $bogomips[1][$i];
        }*/
  if($res['cpu']['num']==1)
   $x1 = '';
  else
   $x1 = ' ×'.$res['cpu']['num'];
  $mhz[1][0] = ' | 频率:'.$mhz[1][0];
  $cache[1][0] = ' | 二级缓存:'.$cache[1][0];
  $bogomips[1][0] = ' | bogomips:'.$bogomips[1][0];
  $res['cpu']['model'][] = $model[1][0].$mhz[1][0].$cache[1][0].$bogomips[1][0].$x1;
        if (false !== is_array($res['cpu']['model'])) $res['cpu']['model'] = implode("<br />", $res['cpu']['model']);
        if (false !== is_array($res['cpu']['mhz'])) $res['cpu']['mhz'] = implode("<br />", $res['cpu']['mhz']);
        if (false !== is_array($res['cpu']['cache'])) $res['cpu']['cache'] = implode("<br />", $res['cpu']['cache']);
        if (false !== is_array($res['cpu']['bogomips'])) $res['cpu']['bogomips'] = implode("<br />", $res['cpu']['bogomips']);
 }

    // network

    // uptime
    if (false === ($str = @file("/proc/uptime"))) return false;
    $str = explode(" ", implode("", $str));
    $str = trim($str[0]);
    $min = $str / 60;
    $hours = $min / 60;
    $days = floor($hours / 24);
    $hours = floor($hours - ($days * 24));
    $min = floor($min - ($days * 60 * 24) - ($hours * 60));
    if ($days !== 0) $res['uptime'] = $days."天";
    if ($hours !== 0) $res['uptime'] .= $hours."小时";
    $res['uptime'] .= $min."分钟";

    // memory
    if (false === ($str = @file("/proc/meminfo"))) return false;
    $str = implode("", $str);
    preg_match_all("/memtotals{0,}:+s{0,}([d.]+).+?memfrees{0,}:+s{0,}([d.]+).+?cacheds{0,}:+s{0,}([d.]+).+?swaptotals{0,}:+s{0,}([d.]+).+?swapfrees{0,}:+s{0,}([d.]+)/s", $str, $buf);
 preg_match_all("/bufferss{0,}:+s{0,}([d.]+)/s", $str, $buffers);

    $res['memtotal'] = round($buf[1][0]/1024, 2);
    $res['memfree'] = round($buf[2][0]/1024, 2);
    $res['membuffers'] = round($buffers[1][0]/1024, 2);
 $res['memcached'] = round($buf[3][0]/1024, 2);
    $res['memused'] = $res['memtotal']-$res['memfree'];
    $res['mempercent'] = (floatval($res['memtotal'])!=0)?round($res['memused']/$res['memtotal']*100,2):0;

    $res['memrealused'] = $res['memtotal'] - $res['memfree'] - $res['memcached'] - $res['membuffers']; //真实内存使用
 $res['memrealfree'] = $res['memtotal'] - $res['memrealused']; //真实空闲
    $res['memrealpercent'] = (floatval($res['memtotal'])!=0)?round($res['memrealused']/$res['memtotal']*100,2):0; //真实内存使用率

 $res['memcachedpercent'] = (floatval($res['memcached'])!=0)?round($res['memcached']/$res['memtotal']*100,2):0; //cached内存使用率

    $res['swaptotal'] = round($buf[4][0]/1024, 2);
    $res['swapfree'] = round($buf[5][0]/1024, 2);
    $res['swapused'] = round($res['swaptotal']-$res['swapfree'], 2);
    $res['swappercent'] = (floatval($res['swaptotal'])!=0)?round($res['swapused']/$res['swaptotal']*100,2):0;

    // load avg
    if (false === ($str = @file("/proc/loadavg"))) return false;
    $str = explode(" ", implode("", $str));
    $str = array_chunk($str, 4);
    $res['loadavg'] = implode(" ", $str[0]);

    return $res;
}

//freebsd系统探测
function sys_freebsd()
{
 //cpu
 if (false === ($res['cpu']['num'] = get_key("hw.ncpu"))) return false;
 $res['cpu']['model'] = get_key("hw.model");
 //load avg
 if (false === ($res['loadavg'] = get_key("vm.loadavg"))) return false;
 //uptime
 if (false === ($buf = get_key("kern.boottime"))) return false;
 $buf = explode(' ', $buf);
 $sys_ticks = time() - intval($buf[3]);
 $min = $sys_ticks / 60;
 $hours = $min / 60;
 $days = floor($hours / 24);
 $hours = floor($hours - ($days * 24));
 $min = floor($min - ($days * 60 * 24) - ($hours * 60));
 if ($days !== 0) $res['uptime'] = $days."天";
 if ($hours !== 0) $res['uptime'] .= $hours."小时";
 $res['uptime'] .= $min."分钟";
 //memory
 if (false === ($buf = get_key("hw.physmem"))) return false;
 $res['memtotal'] = round($buf/1024/1024, 2);

 $str = get_key("vm.vmtotal");
 preg_match_all("/nvirtual memory[:s]*(total[:s]*([d]+)k[,s]*active[:s]*([d]+)k)n/i", $str, $buff, preg_set_order);
 preg_match_all("/nreal memory[:s]*(total[:s]*([d]+)k[,s]*active[:s]*([d]+)k)n/i", $str, $buf, preg_set_order);

 $res['memrealused'] = round($buf[0][2]/1024, 2);
 $res['memcached'] = round($buff[0][2]/1024, 2);
 $res['memused'] = round($buf[0][1]/1024, 2) + $res['memcached'];
 $res['memfree'] = $res['memtotal'] - $res['memused'];
 $res['mempercent'] = (floatval($res['memtotal'])!=0)?round($res['memused']/$res['memtotal']*100,2):0;

 $res['memrealpercent'] = (floatval($res['memtotal'])!=0)?round($res['memrealused']/$res['memtotal']*100,2):0;

 return $res;
}

//取得参数值 freebsd
function get_key($keyname)
{
 return do_command('sysctl', "-n $keyname");
}

//确定执行文件位置 freebsd
function find_command($commandname)
{
 $path = array('/bin', '/sbin', '/usr/bin', '/usr/sbin', '/usr/local/bin', '/usr/local/sbin');
 foreach($path as $p)
 {
  if (@is_executable("$p/$commandname")) return "$p/$commandname";
 }
 return false;
}

//执行系统命令 freebsd
function do_command($commandname, $args)
{
 $buffer = "";
 if (false === ($command = find_command($commandname))) return false;
 if ($fp = @popen("$command $args", 'r'))
 {
  while (!@feof($fp))
  {
   $buffer .= @fgets($fp, 4096);
  }
  return trim($buffer);
 }
 return false;
}

//windows系统探测
function sys_windows()
{
 if (php_version >= 5)
 {
  $objlocator = new com("wbemscripting.swbemlocator");
  $wmi = $objlocator->connectserver();
  $prop = $wmi->get("win32_pnpentity");
 }
 else
 {
  return false;
 }

 //cpu
 $cpuinfo = getwmi($wmi,"win32_processor", array("name","l2cachesize","numberofcores"));
 $res['cpu']['num'] = $cpuinfo[0]['numberofcores'];
 if (null == $res['cpu']['num'])
 {
  $res['cpu']['num'] = 1;
 }/*
 for ($i=0;$i<$res['cpu']['num'];$i++)
 {
  $res['cpu']['model'] .= $cpuinfo[0]['name']."<br />";
  $res['cpu']['cache'] .= $cpuinfo[0]['l2cachesize']."<br />";
 }*/
 $cpuinfo[0]['l2cachesize'] = ' ('.$cpuinfo[0]['l2cachesize'].')';
 if($res['cpu']['num']==1)
  $x1 = '';
 else
  $x1 = ' ×'.$res['cpu']['num'];
 $res['cpu']['model'] = $cpuinfo[0]['name'].$cpuinfo[0]['l2cachesize'].$x1;
 // sysinfo
 $sysinfo = getwmi($wmi,"win32_operatingsystem", array('lastbootuptime','totalvisiblememorysize','freephysicalmemory','caption','csdversion','serialnumber','installdate'));
 $sysinfo[0]['caption']=iconv('gbk', 'utf-8',$sysinfo[0]['caption']);
 $sysinfo[0]['csdversion']=iconv('gbk', 'utf-8',$sysinfo[0]['csdversion']);
 $res['win_n'] = $sysinfo[0]['caption']." ".$sysinfo[0]['csdversion']." 序列号:{$sysinfo[0]['serialnumber']} 于".date('y年m月d日h:i:s',strtotime(substr($sysinfo[0]['installdate'],0,14)))."安装";
 //uptime
 $res['uptime'] = $sysinfo[0]['lastbootuptime'];

 $sys_ticks = 3600*8 + time() - strtotime(substr($res['uptime'],0,14));
 $min = $sys_ticks / 60;
 $hours = $min / 60;
 $days = floor($hours / 24);
 $hours = floor($hours - ($days * 24));
 $min = floor($min - ($days * 60 * 24) - ($hours * 60));
 if ($days !== 0) $res['uptime'] = $days."天";
 if ($hours !== 0) $res['uptime'] .= $hours."小时";
 $res['uptime'] .= $min."分钟";

 //memory
 $res['memtotal'] = round($sysinfo[0]['totalvisiblememorysize']/1024,2);
 $res['memfree'] = round($sysinfo[0]['freephysicalmemory']/1024,2);
 $res['memused'] = $res['memtotal']-$res['memfree']; //上面两行已经除以1024,这行不用再除了
 $res['mempercent'] = round($res['memused'] / $res['memtotal']*100,2);

 $swapinfo = getwmi($wmi,"win32_pagefileusage", array('allocatedbasesize','currentusage'));

 // loadpercentage
 $loadinfo = getwmi($wmi,"win32_processor", array("loadpercentage"));
 $res['loadavg'] = $loadinfo[0]['loadpercentage'];

 return $res;
}

function getwmi($wmi,$strclass, $strvalue = array())
{
 $arrdata = array();

 $objwebm = $wmi->get($strclass);
 $arrprop = $objwebm->properties_;
 $arrwebmcol = $objwebm->instances_();
 foreach($arrwebmcol as $objitem)
 {
  @reset($arrprop);
  $arrinstance = array();
  foreach($arrprop as $propitem)
  {
   eval("$value = $objitem->" . $propitem->name . ";");
   if (empty($strvalue))
   {
    $arrinstance[$propitem->name] = trim($value);
   }
   else
   {
    if (in_array($propitem->name, $strvalue))
    {
     $arrinstance[$propitem->name] = trim($value);
    }
   }
  }
  $arrdata[] = $arrinstance;
 }
 return $arrdata;
}

//比例条
function bar($percent)
{
?>
 <div class="bar"><div class="barli" style="width:<?php echo $percent?>%">&nbsp;</div></div>
<?php
}

$uptime = $sysinfo['uptime'];
$stime = date("y-n-j h:i:s");
$df = round(@disk_free_space(".")/(1024*1024*1024),3);
$dt = round(@disk_total_space(".")/(1024*1024*1024),3);

$load = $sysinfo['loadavg']; //系统负载


//判断内存如果小于1gb,就显示m,否则显示gb单位
if($sysinfo['memtotal']<1024)
{
 $memtotal = $sysinfo['memtotal']." mb";
 $mt = $sysinfo['memtotal']." mb";
 $mu = $sysinfo['memused']." mb";
 $mf = $sysinfo['memfree']." mb";
 $mc = $sysinfo['memcached']." mb"; //cache化内存
 $mb = $sysinfo['membuffers']." mb"; //缓冲
 $st = $sysinfo['swaptotal']." mb";
 $su = $sysinfo['swapused']." mb";
 $sf = $sysinfo['swapfree']." mb";
 $swappercent = $sysinfo['swappercent'];
 $memrealused = $sysinfo['memrealused']." mb"; //真实内存使用
 $memrealfree = $sysinfo['memrealfree']." mb"; //真实内存空闲
 $memrealpercent = $sysinfo['memrealpercent']; //真实内存使用比率
 $mempercent = $sysinfo['mempercent']; //内存总使用率
 $memcachedpercent = $sysinfo['memcachedpercent']; //cache内存使用率
}
else
{
 $memtotal = round($sysinfo['memtotal']/1024,3)." gb";
 $mt = round($sysinfo['memtotal']/1024,3)." gb";
 $mu = round($sysinfo['memused']/1024,3)." gb";
 $mf = round($sysinfo['memfree']/1024,3)." gb";
 $mc = round($sysinfo['memcached']/1024,3)." gb";
 $mb = round($sysinfo['membuffers']/1024,3)." gb";
 $st = round($sysinfo['swaptotal']/1024,3)." gb";
 $su = round($sysinfo['swapused']/1024,3)." gb";
 $sf = round($sysinfo['swapfree']/1024,3)." gb";
 $swappercent = $sysinfo['swappercent'];
 $memrealused = round($sysinfo['memrealused']/1024,3)." gb"; //真实内存使用
 $memrealfree = round($sysinfo['memrealfree']/1024,3)." gb"; //真实内存空闲
 $memrealpercent = $sysinfo['memrealpercent']; //真实内存使用比率
 $mempercent = $sysinfo['mempercent']; //内存总使用率
 $memcachedpercent = $sysinfo['memcachedpercent']; //cache内存使用率
}

//网卡流量
$strs = @file("/proc/net/dev");

for ($i = 2; $i < count($strs); $i++ )
{
 preg_match_all( "/([^s]+):[s]{0,}(d+)s+(d+)s+(d+)s+(d+)s+(d+)s+(d+)s+(d+)s+(d+)s+(d+)s+(d+)s+(d+)/", $strs[$i], $info );
/* $netinput[$i] = formatsize($info[2][0]);
 $netout[$i]  = formatsize($info[10][0]);
*/
 $tmo = round($info[2][0]/1024/1024, 5);
 $tmo2 = round($tmo / 1024, 5);
 $netinput[$i] = $tmo2;
 $tmp = round($info[10][0]/1024/1024, 5);
 $tmp2 = round($tmp / 1024, 5);
 $netout[$i] = $tmp2;

}

//ajax调用实时刷新
if ($_get['act'] == "rt")
{
 $arr=array('freespace'=>"$df",'totalmemory'=>"$mt",'usedmemory'=>"$mu",'freememory'=>"$mf",'cachedmemory'=>"$mc",'buffers'=>"$mb",'totalswap'=>"$st",'swapused'=>"$su",'swapfree'=>"$sf",
'loadavg'=>"$load",'uptime'=>"$uptime",'freetime'=>"$freetime",'bjtime'=>"$bjtime",'stime'=>"$stime",'memrealpercent'=>"$memrealpercent",'memrealused'=>"$memrealused",
'memrealfree'=>"$memrealfree",'mempercent'=>"$mempercent%",'memcachedpercent'=>"$memcachedpercent",'barmemcachedpercent'=>"$memcachedpercent%",
'swappercent'=>"$swappercent",'barmemrealpercent'=>"$memrealpercent%",
'barswappercent'=>"$swappercent%",'netout2'=>"$netout[2]",'netout3'=>"$netout[3]",'netout4'=>"$netout[4]",'netout5'=>"$netout[5]",'netout6'=>"$netout[6]",'netout7'=>"$netout[7]",'netout8'=>"$netout[8]",'netout9'=>"$netout[9]",'netout10'=>"$netout[10]",'netinput2'=>"$netinput[2]",'netinput3'=>"$netinput[3]",'netinput4'=>"$netinput[4]",'netinput5'=>"$netinput[5]",'netinput6'=>"$netinput[6]",'netinput7'=>"$netinput[7]",'netinput8'=>"$netinput[8]",'netinput9'=>"$netinput[9]",'netinput10'=>"$netinput[10]");
 $jarr=json_encode($arr);
 echo $_get['callback'],'(',$jarr,')';
 exit;
}
?>

<!doctype html public "-//w3c//dtd xhtml 1.0 transitional//en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>php探针 for lnmp一键安装包</title>
<meta http-equiv="x-ua-compatible" content="ie=emulateie7" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<!-- powered by: yahei.net -->
<style type="text/css">
<!--
* {font-family: tahoma, "microsoft yahei", arial; }
body{text-align: center; margin: 0 auto; padding: 0; background-color:#ffffff;font-size:12px;font-family:tahoma, arial}
h1 {font-size: 26px; font-weight: normal; padding: 0; margin: 0; color: #444444;}
h1 small {font-size: 11px; font-family: tahoma; font-weight: bold; }
a{color: #000000; text-decoration:none;}
a.black{color: #000000; text-decoration:none;}
b{color: #999999;}
table{clear:both;padding: 0; margin: 0 0 10px;border-collapse:collapse; border-spacing: 0;}
th{padding: 3px 6px; font-weight:bold;background:#3066a6;color:#ffffff;border:1px solid #3066a6; text-align:left;}
.th_1{padding: 3px 6px; font-weight:bold;background:#666699;color:#ffffff;border:1px solid #3066a6; text-align:left;}
.th_2{padding: 3px 6px; font-weight:bold;background:#417291;color:#ffffff;border:1px solid #3066a6; text-align:left;}
.th_3{padding: 3px 6px; font-weight:bold;background:#067201;color:#ffffff;border:1px solid #3066a6; text-align:left;}
.th_4{padding: 3px 6px; font-weight:bold;background:#666666;color:#ffffff;border:1px solid #cccccc; text-align:left;}
.th_5{padding: 3px 6px; font-weight:bold;background:#333333;color:#ffffff;border:1px solid #cccccc; text-align:left;}
.th_6{padding: 3px 6px; font-weight:bold;background:#ff6600;color:#ffffff;border:1px solid #ff6600; text-align:left;}
tr{padding: 0; background:#f7f7f7;}
td{padding: 3px 6px; border:1px solid #cccccc;}
input{padding: 2px; background: #ffffff; border-top:1px solid #666666; border-left:1px solid #666666; border-right:1px solid #cccccc; border-bottom:1px solid #cccccc; font-size:12px}
input.btn{font-weight: bold; height: 20px; line-height: 20px; padding: 0 6px; color:#666666; background: #f2f2f2; border:1px solid #999;font-size:12px}
.bar {border:1px solid #999999; background:#ffffff; height:5px; font-size:2px; width:89%; margin:2px 0 5px 0;padding:1px;overflow: hidden;}
.bar_1 {border:1px dotted #999999; background:#ffffff; height:5px; font-size:2px; width:89%; margin:2px 0 5px 0;padding:1px;overflow: hidden;}
.barli_red{background:#ff6600; height:5px; margin:0px; padding:0;}
.barli_blue{background:#0099ff; height:5px; margin:0px; padding:0;}
.barli_green{background:#36b52a; height:5px; margin:0px; padding:0;}
.barli_1{background:#999999; height:5px; margin:0px; padding:0;}
.barli{background:#36b52a; height:5px; margin:0px; padding:0;}
#page {width: 920px; padding: 0 20px; margin: 0 auto; text-align: left;}
#header{position: relative; padding: 10px;}
#footer {padding: 15px 0; text-align: center; font-size: 11px; font-family: tahoma, verdana;}
#lnmplink {position: absolute; top: 20px; left: 115px; text-align: right; font-weight: bold; color: #06c;}
#lnmplink a {color: #0000ff; text-decoration: underline;}
.w_small{font-family: courier new;}
.w_number{color: #f800fe;}
.sudu {padding: 0; background:#5dafd1; }
.suduk { margin:0px; padding:0;}
.resyes{}
.resno{color: #ff0000;}
.word{word-break:break-all;}
-->
</style>
<script language="javascript" type="text/javascript" src="http://lib.sinaapp.com/js/jquery/1.7/jquery.min.js"></script>
<script type="text/javascript">
<!--
$(document).ready(function(){getjsondata();});
function getjsondata()
{
 settimeout("getjsondata()", 1000);
 $.getjson('?act=rt&callback=?', displaydata);
}
function displaydata(datajson)
{
 $("#freespace").html(datajson.freespace);
 $("#totalmemory").html(datajson.totalmemory);
 $("#usedmemory").html(datajson.usedmemory);
 $("#freememory").html(datajson.freememory);
 $("#cachedmemory").html(datajson.cachedmemory);
 $("#buffers").html(datajson.buffers);
 $("#totalswap").html(datajson.totalswap);
 $("#swapused").html(datajson.swapused);
 $("#swapfree").html(datajson.swapfree);
 $("#swappercent").html(datajson.swappercent);
 $("#loadavg").html(datajson.loadavg);
 $("#uptime").html(datajson.uptime);
 $("#freetime").html(datajson.freetime);
 $("#stime").html(datajson.stime);
 $("#bjtime").html(datajson.bjtime);
 $("#memrealused").html(datajson.memrealused);
 $("#memrealfree").html(datajson.memrealfree);
 $("#memrealpercent").html(datajson.memrealpercent);
 $("#mempercent").html(datajson.mempercent);
 $("#barmempercent").width(datajson.mempercent);
 $("#barmemrealpercent").width(datajson.barmemrealpercent);
 $("#memcachedpercent").html(datajson.memcachedpercent);
 $("#barmemcachedpercent").width(datajson.barmemcachedpercent);
 $("#barswappercent").width(datajson.barswappercent);
 $("#netout2").html(datajson.netout2);
 $("#netout3").html(datajson.netout3);
 $("#netout4").html(datajson.netout4);
 $("#netout5").html(datajson.netout5);
 $("#netout6").html(datajson.netout6);
 $("#netout7").html(datajson.netout7);
 $("#netout8").html(datajson.netout8);
 $("#netout9").html(datajson.netout9);
 $("#netout10").html(datajson.netout10);
 $("#netinput2").html(datajson.netinput2);
 $("#netinput3").html(datajson.netinput3);
 $("#netinput4").html(datajson.netinput4);
 $("#netinput5").html(datajson.netinput5);
 $("#netinput6").html(datajson.netinput6);
 $("#netinput7").html(datajson.netinput7);
 $("#netinput8").html(datajson.netinput8);
 $("#netinput9").html(datajson.netinput9);
 $("#netinput10").html(datajson.netinput10); 
}
-->
</script>
</head>
<body>

<div id="page">
    <div id="header">
        <h1>php探针</h1>
        <div id="lnmplink"> <a href="http://lnmp.org" target="_blank">lnmp一键安装包</a> <a href="http://bbs.vpser.net/forum-25-1.html" target="_blank">技术支持论坛</a> &nbsp;&nbsp;<a href="http://www.linyuting.cn/" target="_blank">lyt博客</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="?logout" style="color:red;">退出登录</a></div>
    </div>

<!--服务器相关参数-->
<table width="100%" cellpadding="3" cellspacing="0">
  <tr><th colspan="4">服务器参数</th></tr>
  <tr>
    <td>服务器域名/IP地址</td>
    <td colspan="3"><?php echo $_server['server_name'];?>(<?php if('/'==directory_separator){echo $_server['server_addr'];}else{echo @gethostbyname($_server['server_name']);} ?>)</td>
  </tr>
  <tr>
    <td>服务器标识</td>
    <td colspan="3"><?php if($sysinfo['win_n'] != ''){echo $sysinfo['win_n'];}else{echo @php_uname();};?></td>
  </tr>
  <tr>
    <td width="13%">服务器操作系统</td>
    <td width="37%"><?php $os = explode(" ", php_uname()); echo $os[0];?> &nbsp;内核版本:<?php if('/'==directory_separator){echo $os[2];}else{echo $os[1];} ?></td>
    <td width="13%">服务器解译引擎</td>
    <td width="37%"><?php echo $_server['server_software'];?></td>
  </tr>
  <tr>
    <td>服务器语言</td>
    <td><?php echo getenv("http_accept_language");?></td>
    <td>服务器端口</td>
    <td><?php echo $_server['server_port'];?></td>
  </tr>
  <tr>
   <td>服务器主机名</td>
   <td><?php if('/'==directory_separator ){echo $os[1];}else{echo $os[2];} ?></td>
   <td>绝对路径</td>
   <td><?php echo $_server['document_root']?str_replace('','/',$_server['document_root']):str_replace('','/',dirname(__file__));?></td>
 </tr>
  <tr>
   <td>管理员邮箱</td>
   <td><?php echo $_server['server_admin'];?></td>
  <td>探针路径</td>
  <td><?php echo str_replace('','/',__file__)?str_replace('','/',__file__):$_server['script_filename'];?></td>
 </tr>
</table>

<?if("show"==$sysreshow){?>
<table width="100%" cellpadding="3" cellspacing="0" align="center">
  <tr><th colspan="6">服务器实时数据</th></tr>
  <tr>
    <td width="13%" >服务器当前时间</td>
    <td width="37%" ><span id="stime"><?php echo $stime;?></span></td>
    <td width="13%" >服务器已运行时间</td>
    <td width="37%" colspan="3"><span id="uptime"><?php echo $uptime;?></span></td>
  </tr>
  <tr>
    <td>总空间</td>
    <td><?php echo $dt;?>&nbsp;gb</td>
    <td><a href="#" title="显示的是网站所在的目录的可用空间,非服务器上所有磁盘之可用空间!">可用空间</a></td>
    <td colspan="3"><font color='#cc0000'><span id="freespace"><?php echo $df;?></span></font>&nbsp;gb</td>
  </tr>
  <tr>
    <td width="13%">cpu型号 [<?php echo $sysinfo['cpu']['num'];?>核]</td>
    <td width="87%" colspan="5"><?php echo $sysinfo['cpu']['model'];?></td>
  </tr>
   <tr>
  <td>内存使用状况<br ><br ><a href="http://www.vpser.net/other/linux-vps-ram.html" target="_blank"><font color=red>内存参数解读</font></a></td>
  <td colspan="5">
<?php
$tmp = array(
    'memtotal', 'memused', 'memfree', 'mempercent',
    'memcached', 'memrealpercent',
    'swaptotal', 'swapused', 'swapfree', 'swappercent'
);
foreach ($tmp as $v) {
    $sysinfo[$v] = $sysinfo[$v] ? $sysinfo[$v] : 0;
}
?>
          物理内存:共
          <font color='#cc0000'><?php echo $memtotal;?> </font>
           , 已用
          <font color='#cc0000'><span id="usedmemory"><?php echo $mu;?></span></font>
          , 空闲
          <font color='#cc0000'><span id="freememory"><?php echo $mf;?></span></font>
          , 使用率
    <span id="mempercent"><?php echo $mempercent;?></span>
          <div class="bar"><div id="barmempercent" class="barli_green" style="width:<?php echo $mempercent?>%">&nbsp;</div> </div>
<?php
//判断如果cache为0,不显示
if($sysinfo['memcached']>0)
{
?>  
    cache化内存为 <span id="cachedmemory"><?php echo $mc;?></span>
    , 使用率
          <span id="memcachedpercent"><?php echo $memcachedpercent;?></span>
    % | buffers缓冲为  <span id="buffers"><?php echo $mb;?></span>
          <div class="bar"><div id="barmemcachedpercent" class="barli_blue" >&nbsp;</div></div>

          真实内存使用
          <span id="memrealused"><?php echo $memrealused;?></span>
    , 真实内存空闲
          <span id="memrealfree"><?php echo $memrealfree;?></span>
    , 使用率
          <span id="memrealpercent"><?php echo $memrealpercent;?></span>
          %
          <div class="bar_1"><div id="barmemrealpercent" class="barli_1" >&nbsp;</div></div>
<?php
}
//判断如果swap区为0,不显示
if($sysinfo['swaptotal']>0)
{
?> 
          swap区:共
          <?php echo $st;?>
          , 已使用
          <span id="swapused"><?php echo $su;?></span>
          , 空闲
          <span id="swapfree"><?php echo $sf;?></span>
          , 使用率
          <span id="swappercent"><?php echo $swappercent;?></span>
          %
          <div class="bar"><div id="barswappercent" class="barli_red" >&nbsp;</div> </div>

<?php

?>   
   </td>
 </tr>
   <tr>
  <td>系统平均负载</td>
  <td colspan="5" class="w_number"><span id="loadavg"><?php echo $load;?></span></td>
 </tr>
</table>
<?}?>

<?php if (false !== ($strs = @file("/proc/net/dev"))) : ?>
<table width="100%" cellpadding="3" cellspacing="0" align="center">
    <tr><th colspan="3">网络使用状况</th></tr>
<?php for ($i = 2; $i < count($strs); $i++ ) : ?>
<?php preg_match_all( "/([^s]+):[s]{0,}(d+)s+(d+)s+(d+)s+(d+)s+(d+)s+(d+)s+(d+)s+(d+)s+(d+)s+(d+)s+(d+)/", $strs[$i], $info );?>
     <tr>
        <td width="13%"><?php echo $info[1][0]?> : </td>
        <td width="43%">已接收 : <font color='#cc0000'><span id="netinput<?php echo $i?>"><?php echo $netinput[$i]?></span></font> gb</td>
        <td width="43%">已发送 : <font color='#cc0000'><span id="netout<?php echo $i?>"><?php echo $netout[$i]?></span></font> gb</td>
    </tr>
<?php endfor; ?>
</table>
<?php endif; ?>

<table width="100%" cellpadding="3" cellspacing="0" align="center">
  <tr>
    <th colspan="4" class="th_1">php已编译模块检测</th>
  </tr>
  <tr>
    <td colspan="4"><span class="w_small">
<?php
$able=get_loaded_extensions();
foreach ($able as $key=>$value) {
 if ($key!=0 && $key%13==0) {
  echo '<br />';
 }
 echo "$value&nbsp;&nbsp;";
}
?></span>
    </td>
  </tr>
</table>
<table width="100%" cellpadding="3" cellspacing="0" align="center">
  <tr><th colspan="4" class="th_1">php相关参数</th></tr>
  <tr>
    <td width="32%">php信息(phpinfo):</td>
    <td width="18%">
  <?php
  $phpself = $_server[php_self] ? $_server[php_self] : $_server[script_name];
  $disfuns=get_cfg_var("disable_functions");
  ?>
    <?php echo (false!==eregi("phpinfo",$disfuns))? '<font color="red">×</font>' :"<a href='$phpself?act=phpinfo' target='_blank'>phpinfo</a>";?>
    </td>
    <td width="32%">php版本(php_version):</td>
    <td width="18%"><?php echo php_version;?></td>
  </tr>
  <tr>
    <td>php运行方式:</td>
    <td><?php echo strtoupper(php_sapi_name());?></td>
    <td>脚本占用最大内存(memory_limit):</td>
    <td><?php echo show("memory_limit");?></td>
  </tr>
  <tr>
    <td>php安全模式(safe_mode):</td>
    <td><?php echo show("safe_mode");?></td>
    <td>post方法提交最大限制(post_max_size):</td>
    <td><?php echo show("post_max_size");?></td>
  </tr>
  <tr>
    <td>上传文件最大限制(upload_max_filesize):</td>
    <td><?php echo show("upload_max_filesize");?></td>
    <td>浮点型数据显示的有效位数(precision):</td>
    <td><?php echo show("precision");?></td>
  </tr>
  <tr>
    <td>脚本超时时间(max_execution_time):</td>
    <td><?php echo show("max_execution_time");?>秒</td>
    <td>socket超时时间(default_socket_timeout):</td>
    <td><?php echo show("default_socket_timeout");?>秒</td>
  </tr>
  <tr>
    <td>php页面根目录(doc_root):</td>
    <td><?php echo show("doc_root");?></td>
    <td>用户根目录(user_dir):</td>
    <td><?php echo show("user_dir");?></td>
  </tr>
  <tr>
    <td>dl()函数(enable_dl):</td>
    <td><?php echo show("enable_dl");?></td>
    <td>指定包含文件目录(include_path):</td>
    <td><?php echo show("include_path");?></td>
  </tr>
  <tr>
    <td>显示错误信息(display_errors):</td>
    <td><?php echo show("display_errors");?></td>
    <td>自定义全局变量(register_globals):</td>
    <td><?php echo show("register_globals");?></td>
  </tr>
  <tr>
    <td>数据反斜杠转义(magic_quotes_gpc):</td>
    <td><?php echo show("magic_quotes_gpc");?></td>
    <td>"&lt;?...?&gt;"短标签(short_open_tag):</td>
    <td><?php echo show("short_open_tag");?></td>
  </tr>
  <tr>
    <td>"&lt;% %&gt;"asp风格标记(asp_tags):</td>
    <td><?php echo show("asp_tags");?></td>
    <td>忽略重复错误信息(ignore_repeated_errors):</td>
    <td><?php echo show("ignore_repeated_errors");?></td>
  </tr>
  <tr>
    <td>忽略重复的错误源(ignore_repeated_source):</td>
    <td><?php echo show("ignore_repeated_source");?></td>
    <td>报告内存泄漏(report_memleaks):</td>
    <td><?php echo show("report_memleaks");?></td>
  </tr>
  <tr>
    <td>自动字符串转义(magic_quotes_gpc):</td>
    <td><?php echo show("magic_quotes_gpc");?></td>
    <td>外部字符串自动转义(magic_quotes_runtime):</td>
    <td><?php echo show("magic_quotes_runtime");?></td>
  </tr>
  <tr>
    <td>打开远程文件(allow_url_fopen):</td>
    <td><?php echo show("allow_url_fopen");?></td>
    <td>声明argv和argc变量(register_argc_argv):</td>
    <td><?php echo show("register_argc_argv");?></td>
  </tr>
  <tr>
    <td>cookie 支持:</td>
    <td><?php echo isset($_cookie)?'<font color="green">√</font>' : '<font color="red">×</font>';?></td>
    <td>拼写检查(aspell library):</td>
    <td><?php echo isfun("aspell_check_raw");?></td>
  </tr>
   <tr>
    <td>高精度数学运算(bcmath):</td>
    <td><?php echo isfun("bcadd");?></td>
    <td>prel相容语法(pcre):</td>
    <td><?php echo isfun("preg_match");?></td>
   <tr>
    <td>pdf文档支持:</td>
    <td><?php echo isfun("pdf_close");?></td>
    <td>snmp网络管理协议:</td>
    <td><?php echo isfun("snmpget");?></td>
  </tr>
   <tr>
    <td>vmailmgr邮件处理:</td>
    <td><?php echo isfun("vm_adduser");?></td>
    <td>curl支持:</td>
    <td><?php echo isfun("curl_init");?></td>
  </tr>
   <tr>
    <td>smtp支持:</td>
    <td><?php echo get_cfg_var("smtp")?'<font color="green">√</font>' : '<font color="red">×</font>';?></td>
    <td>smtp地址:</td>
    <td><?php echo get_cfg_var("smtp")?get_cfg_var("smtp"):'<font color="red">×</font>';?></td>
  </tr>
 <tr>
  <td>默认支持函数(enable_functions):</td>
  <td colspan="3"><a href='<?php echo $phpself;?>?act=function' target='_blank' class='static'>请点这里查看详细!</a></td>  
 </tr>
 <tr>
  <td>被禁用的函数(disable_functions):</td>
  <td colspan="3" class="word">
<?php
$disfuns=get_cfg_var("disable_functions");
if(empty($disfuns))
{
 echo '<font color=red>×</font>';
}
else
{
 //echo $disfuns;
 $disfuns_array =  explode(',',$disfuns);
 foreach ($disfuns_array as $key=>$value)
 {
  if ($key!=0 && $key%5==0) {
   echo '<br />';
 }
 echo "$value&nbsp;&nbsp;";

}

?>
  </td>
 </tr>
</table>
<!--组件信息-->
<table width="100%" cellpadding="3" cellspacing="0" align="center">
  <tr><th colspan="4" class="th_1">组件支持</th></tr>
  <tr>
    <td width="32%">ftp支持:</td>
    <td width="18%"><?php echo isfun("ftp_login");?></td>
    <td width="32%">xml解析支持:</td>
    <td width="18%"><?php echo isfun("xml_set_object");?></td>
  </tr>
  <tr>
    <td>session支持:</td>
    <td><?php echo isfun("session_start");?></td>
    <td>socket支持:</td>
    <td><?php echo isfun("socket_accept");?></td>
  </tr>
  <tr>
    <td>calendar支持</td>
    <td><?php echo isfun('cal_days_in_month');?>
 </td>
    <td>允许url打开文件:</td>
    <td><?php echo show("allow_url_fopen");?></td>
  </tr>
  <tr>
    <td>gd库支持:</td>
    <td>
    <?php
        if(function_exists(gd_info)) {
            $gd_info = @gd_info();
         echo $gd_info["gd version"];
     }else{echo '<font color="red">×</font>';}
 ?></td>
    <td>压缩文件支持(zlib):</td>
    <td><?php echo isfun("gzclose");?></td>
  </tr>
  <tr>
    <td>imap电子邮件系统函数库:</td>
    <td><?php echo isfun("imap_close");?></td>
    <td>历法运算函数库:</td>
    <td><?php echo isfun("jdtogregorian");?></td>
  </tr>
  <tr>
    <td>正则表达式函数库:</td>
    <td><?php echo isfun("preg_match");?></td>
    <td>wddx支持:</td>
    <td><?php echo isfun("wddx_add_vars");?></td>
  </tr>
  <tr>
    <td>iconv编码转换:</td>
    <td><?php echo isfun("iconv");?></td>
    <td>mbstring:</td>
    <td><?php echo isfun("mb_eregi");?></td>
  </tr>
  <tr>
    <td>高精度数学运算:</td>
    <td><?php echo isfun("bcadd");?></td>
    <td>ldap目录协议:</td>
    <td><?php echo isfun("ldap_close");?></td>
  </tr>
  <tr>
    <td>mcrypt加密处理:</td>
    <td><?php echo isfun("mcrypt_cbc");?></td>
    <td>哈稀计算:</td>
    <td><?php echo isfun("mhash_count");?></td>
  </tr>
</table>

<!--第三方组件信息-->
<table width="100%" cellpadding="3" cellspacing="0" align="center">
  <tr><th colspan="4" class="th_1">第三方组件</th></tr>
  <tr>
    <td width="32%">zend版本</td>
    <td width="18%"><?php $zend_version = zend_version();if(empty($zend_version)){echo '<font color=red>×</font>';}else{echo $zend_version;}?></td>
    <td width="32%">
<?php
$php_version = php_version;
$php_version = substr($php_version,2,1);
if($php_version > 2)
{
 echo "zendguardloader[启用]";
}
else
{
 echo "zend optimizer";
}
?>
 </td>
    <td width="18%"><?php if($php_version > 2){echo (get_cfg_var("zend_loader.enable"))?'<font color=green>√</font>':'<font color=red>×</font>';} else{if(function_exists('zend_optimizer_version')){ echo zend_optimizer_version();}else{ echo (get_cfg_var("zend_optimizer.optimization_level")||get_cfg_var("zend_extension_manager.optimizer_ts")||get_cfg_var("zend.ze1_compatibility_mode")||get_cfg_var("zend_extension_ts"))?'<font color=green>√</font>':'<font color=red>×</font>';}}?></td>
  </tr>
  <tr>
    <td>eaccelerator</td>
    <td><?php if((phpversion('eaccelerator'))!=''){echo phpversion('eaccelerator');}else{ echo "<font color=red>×</font>";} ?></td>
    <td>ioncube</td>
    <td><?php if(extension_loaded('ioncube loader')){   $ys = ioncube_loader_iversion();   $gm = ".".(int)substr($ys,3,2);   echo ioncube_loader_version().$gm;}else{echo "<font color=red>×</font>";}?></td>
  </tr>
  <tr>
    <td>xcache</td>
    <td><?php if((phpversion('xcache'))!=''){echo phpversion('xcache');}else{ echo "<font color=red>×</font>";} ?></td>
    <td>apc</td>
    <td><?php if((phpversion('apc'))!=''){echo phpversion('apc');}else{ echo "<font color=red>×</font>";} ?></td>
  </tr>
</table>

<!--数据库支持-->
<table width="100%" cellpadding="3" cellspacing="0" align="center">
  <tr><th colspan="4" class="th_2">数据库支持</th></tr>
  <tr>
    <td width="32%">mysql 数据库:</td>
    <td width="18%"><?php echo isfun("mysql_close");?>
    <?php
    if(function_exists("mysql_get_server_info")) {
        $s = @mysql_get_server_info();
        $s = $s ? '&nbsp; mysql_server 版本:'.$s : '';
     $c = '&nbsp; mysql_client 版本:'.@mysql_get_client_info();
        echo $s;
    }
    ?>
 </td>
    <td width="32%">odbc 数据库:</td>
    <td width="18%"><?php echo isfun("odbc_close");?></td>
  </tr>
  <tr>
    <td>oracle 数据库:</td>
    <td><?php echo isfun("ora_close");?></td>
    <td>sql server 数据库:</td>
    <td><?php echo isfun("mssql_close");?></td>
  </tr>
  <tr>
    <td>dbase 数据库:</td>
    <td><?php echo isfun("dbase_close");?></td>
    <td>msql 数据库:</td>
    <td><?php echo isfun("msql_close");?></td>
  </tr>
  <tr>
    <td>sqlite 数据库:</td>
    <td><?php if(extension_loaded('sqlite3')) {$sqlitever = sqlite3::version();echo '<font color=green>√</font> ';echo "sqlite3 ver ";echo $sqlitever[versionstring];}else {echo isfun("sqlite_close");if(isfun("sqlite_close") == '<font color="green">√</font>') {echo "&nbsp; 版本: ".@sqlite_libversion();}}?></td>
    <td>hyperwave 数据库:</td>
    <td><?php echo isfun("hw_close");?></td>
  </tr>
  <tr>
    <td>postgre sql 数据库:</td>
    <td><?php echo isfun("pg_close"); ?></td>
    <td>informix 数据库:</td>
    <td><?php echo isfun("ifx_close");?></td>
  </tr>
  <tr>
    <td>dba 数据库:</td>
    <td><?php echo isfun("dba_close");?></td>
    <td>dbm 数据库:</td>
    <td><?php echo isfun("dbmclose");?></td>
  </tr>
  <tr>
    <td>filepro 数据库:</td>
    <td><?php echo isfun("filepro_fieldcount");?></td>
    <td>sybase 数据库:</td>
    <td><?php echo isfun("sybase_close");?></td>
  </tr>
</table>

<form action="<?php echo $_server[php_self]."#bottom";?>" method="post">
<!--mysql数据库连接检测-->
<table width="100%" cellpadding="3" cellspacing="0" align="center">
 <tr><th colspan="3" class="th_2">mysql数据库连接检测</th></tr>
  <tr>
    <td width="15%"></td>
    <td width="60%">
      地址:<input type="text" name="host" value="localhost" size="10" />
      端口:<input type="text" name="port" value="3306" size="10" />
      用户名:<input type="text" name="login" size="10" />
      密码:<input type="password" name="password" size="10" />
    </td>
    <td width="25%">
      <input class="btn" type="submit" name="act" value="mysql检测" />
    </td>
  </tr>
</table>
  <?php
  if ($_post['act'] == 'mysql检测') {
   if(function_exists("mysql_close")==1) {
    $link = @mysql_connect($host.":".$port,$login,$password);
    if ($link){
     echo "<script>alert('连接到mysql数据库正常')</script>";
    } else {
     echo "<script>alert('无法连接到mysql数据库!')</script>";
    }
   } else {
    echo "<script>alert('服务器不支持mysql数据库!')</script>";
   }
  }
 ?>
<!--函数检测-->
<table width="100%" cellpadding="3" cellspacing="0" align="center">
 <tr><th colspan="3" class="th_4">函数检测</th></tr>
  <tr>
    <td width="15%"></td>
    <td width="60%">
      请输入您要检测的函数:
      <input type="text" name="funname" size="50" />
    </td>
    <td width="25%">
      <input class="btn" type="submit" name="act" align="right" value="函数检测" />
    </td>
  </tr>
  <?php
  if ($_post['act'] == '函数检测') {
   echo "<script>alert('$funre')</script>";
  }
  ?>
</table>
<!--邮件发送检测-->
<table width="100%" cellpadding="3" cellspacing="0" align="center">
  <tr><th colspan="3" class="th_5">邮件发送检测</th></tr>
  <tr>
    <td width="15%"></td>
    <td width="60%">
      请输入您要检测的邮件地址:
      <input type="text" name="mailadd" size="50" />
    </td>
    <td width="25%">
    <input class="btn" type="submit" name="act" value="邮件检测" />
    </td>
  </tr>
  <?php
  if ($_post['act'] == '邮件检测') {
   echo "<script>alert('$mailre')</script>";
  }
  ?>
</table>
</form>
<a id="bottom"></a>

<div id="footer">
&copy; 2012 <a href="http://lnmp.org" target="_blank">lnmp一键安装包</a><br />this prober was based on yahei prober.<br />
<?php $run_time = sprintf('%0.4f', microtime_float() - $time_start);?>
processed in <?php echo $run_time?> seconds. <?php echo memory_usage();?> memory usage.
</div>
</div>
</body>
</html>
 

可能的问题:php探针不显示cpu、内存、硬盘信息原因