<?php
/*
+--------------------------------------------------------------------------
| iProber v0.024
| ========================================
| by Tahiti
| dEpoch Studio
| http://www.depoch.net
| ========================================
| Web: http://www.depoch.net
| Last Updated: 29th April 2006
| Email: depoch@gmail.com
+---------------------------------------------------------------------------
|
| > PHP PROBER
| > Script written by Tahiti
| > Date started: 27th June 2004
|
+--------------------------------------------------------------------------
/* Functions in this file */
/**************************/
// bar($percent)
// find_command($commandName)
// getcon($varName)
// get_key($keyName)
// isfun($funName)
// sys_freebsd()
// sys_linux()
// test_float()
// test_int()
// test_io()
// do_command($commandName, $args)
header("content-Type: text/html; charset=utf-8");
error_reporting(E_ERROR | E_WARNING | E_PARSE);
ob_start();
$valInt = (false == empty($_POST['pInt']))?$_POST['pInt']:"未测试";
$valFloat = (false == empty($_POST['pFloat']))?$_POST['pFloat']:"未测试";
$valIo = (false == empty($_POST['pIo']))?$_POST['pIo']:"未测试";
$mysqlReShow = "none";
$mailReShow = "none";
$funReShow = "none";
$opReShow = "none";
$sysReShow = "none";
define("YES", "<span class='resYes'>YES</span>");
define("NO", "<span class='resNo'>NO</span>");
define("ICON", "<span class='icon'>2</span> ");
$phpSelf = $_SERVER[PHP_SELF] ? $_SERVER[PHP_SELF] : $_SERVER[SCRIPT_NAME];
define("PHPSELF", preg_replace("/(.{0,}?\/+)/", "", $phpSelf));
if ($_GET['act'] == "phpinfo")
{
phpinfo();
exit();
}
elseif($_POST['act'] == "TEST_1")
{
$valInt = test_int();
}
elseif($_POST['act'] == "TEST_2")
{
$valFloat = test_float();
}
elseif($_POST['act'] == "TEST_3")
{
$valIo = test_io();
}
elseif($_POST['act'] == "CONNECT")
{
$mysqlReShow = "show";
$mysqlRe = "MYSQL连接测试结果:";
$mysqlRe .= (false !== @mysql_connect($_POST['mysqlHost'], $_POST['mysqlUser'], $_POST['mysqlPassword']))?"MYSQL服务器连接正常, ":
"MYSQL服务器连接失败, ";
$mysqlRe .= "数据库 <b>".$_POST['mysqlDb']."</b> ";
$mysqlRe .= (false != @mysql_select_db($_POST['mysqlDb']))?"连接正常":
"连接失败";
}
elseif($_POST['act'] == "SENDMAIL")
{
$mailReShow = "show";
$mailRe = "MAIL邮件发送测试结果:发送";
$mailRe .= (false !== @mail($_POST["mailReceiver"], "MAIL SERVER TEST", "This email is sent by iProber.\r\n\r\ndEpoch Studio\r\nhttp://depoch.net"))?"完成":"失败";
}
elseif($_POST['act'] == "FUNCTION_CHECK")
{
$funReShow = "show";
$funRe = "函数 <b>".$_POST['funName']."</b> 支持状况检测结果:".isfun($_POST['funName']);
}
elseif($_POST['act'] == "CONFIGURATION_CHECK")
{
$opReShow = "show";
$opRe = "配置参数 <b>".$_POST['opName']."</b> 检测结果:".getcon($_POST['opName']);
}
// 系统参数
switch (PHP_OS)
{
case "Linux":
$sysReShow = (false !== ($sysInfo = sys_linux()))?"show":"none";
break;
case "FreeBSD":
$sysReShow = (false !== ($sysInfo = sys_freebsd()))?"show":"none";
break;
default:
break;
}
/*========================================================================*/
?>
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>PHP探针 iProber V0.024</title>
<meta name="keywords" content="php探针,探针程序,php探针程序,探针,iProber,dEpoch Studio" />
<style type="text/css">
<!--
body,div,p,ul,form,h1 { margin:0px; padding:0px; }
body { background:#252724; }
div,a,input { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; color:#7D795E; }
div { margin-left:auto; margin-right:auto; width:720px; }
input { border: 1px solid #414340; background:#353734; }
a,#t3 a.arrow,#f1 a.arrow { text-decoration:none; color:#978F78; }
a:hover { text-decoration:underline; }
a.arrow { font-family:Webdings, sans-serif; color:#343525; font-size:10px; }
a.arrow:hover { color:#ff0000; text-decoration:none; }
.resYes { font-size: 9px; font-weight: bold; color: #33CC00; }
.resNo { font-size: 9px; font-weight: bold; color: #CC3300; }
.myButton { font-size:10px; font-weight:bold; background:#3D3F3E; border:1px solid #4A4C49; border-right-color:#2D2F2C; border-bottom-color:#2D2F2C; color:#978F78; }
.bar { border:1px solid #2D2F2C; background:#6C6754; height:8px; font-size:2px; }
.bar li { background:#979179; height:8px; font-size:2px; list-style-type:none; }
table { clear:both; background:#2D2F2C; border:3px solid #41433E; margin-bottom:10px; }
td,th { padding:4px; background:#363835; }
th { background:#7E7860; color:#343525; text-align:left; }
th span { font-family:Webdings, sans-serif; font-weight:normal; padding-right:4px; }
th p { float:right; line-height:10px; text-align:right; }
th a { color:#343525; }
h1 { color:#009900; font-size:35px; width:300px; float:left; }
h1 b { color:#cc3300; font-size:50px; font-family: Webdings, sans-serif; font-weight:normal; }
h1 span { font-size:10px; padding-left:10px; color:#7D795E; }
#t12 { float:right; text-align:right; padding:15px 0px 30px 0px; }
#t12 a { line-height:18px; color:#7D795E; }
#t3 td{ line-height:30px; height:30px; text-align:center; background:#3D3F3E; border:1px solid #4A4C49; border-right:none; border-bottom:none; }
#t3 th,#t3 th a { font-weight:normal; }
#m4 td {text-align:center;}
.th2 th,.th3 { background:#232522; text-align:center; color:#7D795E; font-weight:normal; }
.th3 { font-weight:bold; text-align:left; }
#footer table { clear:none; }
#footer td { text-align:center; padding:1px 3px; font-size:9px; }
#footer a { font-size:9px; }
#f1 { text-align:right; padding:15px; }
#f2 {float:left; border:1px solid #dddddd; }
#f2 td { background:#FF6600; }
#f2 a { color:#ffffff; }
#f3 { border: 1px solid #888888; float:right; }
#f3 a { color:#222222; }
#f31 { background:#2359B1; color:#FFFFFF; }
#f32 { background:#dddddd; }
-->
</style>
</head>
<body>
<form method="post" action="<?=PHPSELF."#bottom"?>">
<div>
<input type="hidden" name="pInt" value="<?=$valInt?>" />
<input type="hidden" name="pFloat" value="<?=$valFloat?>" />
<input type="hidden" name="pIo" value="<?=$valIo?>" />
<!-- =============================================================
页头
============================================================= -->
<h1><i><b>i</b>Prober</i><span>V0.024</span></h1>
<a name="top"></a>
<p id="t12">
<a href="http://depoch.net/download.htm" target="_blank">点击下载 iProber 探针, 或查看最新版本 </a>
■<br />
<a href="mailto:depoch@gmail.com">报告BUGS, 或反馈意见给 dEpoch Studio </a>
■
</p>
<table width="100%" border="0" cellspacing="1" cellpadding="0" id="t3">
<tr>
<td><a href="#sec1">服务器特征</a></td>
<td><a href="#sec2">PHP基本特征</a></td>
<td><a href="#sec3">PHP组件支持状况</a></td>
<td><a href="#sec4">服务器性能检测</a></td>
<td><a href="#sec5">自定义检测</a></td>
<td><a href="<?=PHPSELF?>" class="t211">刷新</a></td>
<td><a href="#bottom" class="arrow">66</a></td>
</tr>
<tr>
<th colspan="7"><b>〖AD〗</b>
<a href="http://www.egobiz.com" target="_blank">羿高域名商务网: </a>
<a href="http://www.egobiz.com/domain/" target="_blank">域名注册</a>
<a href="http://www.egobiz.com/domain-sell/"