小知识 学习 信息 资料
触屏版

close ◇ 读取数据,请稍候 Loading...

.: Welcome to flymote.com [flymot.com] :.



  »

◆ 其它资料:.

PHP探针 李茂祥修改版

2005-05-22 19:21:17   李茂祥      阅读: 6970   【本类别其它资料】 【资料库首页
上一篇 收藏 打印 收藏夹 下一篇

2008-12-31 因为我的系统总是出现“验证码” 问题,我就调整了一下这个探针,增加对cookie和session的检测和信息显示 (by lmx 09元旦)
〖PHP探针 李茂祥修改版〗
<?php
session_start();
@include("PEAR.php");
////////////////////////////////////////////
//如果您看见这句话,说明您现在使用的服务器不支持PHP
////////////////////////////////////////////
// 本程序由李茂祥( Modified by Limaoxiang 2005/2/12 2008/12/31)进行修改,
// Copyright(C) LiMaoXiang,2005 All rights reserved
// 原作者信息如下:
// C1G的PHP探针V2.1 Build 040616 Copyright(C) Chu Yiguo, C1G Studio, 2004. All rights reserved
//
// 版权说明:
// 本程序为免费软件,你可以复制、传播和使用。
// 使用者须保留版权说明和著作权申明,不得刪除。
//
// 修改: 1、将所有php短标签(<?)改为标准标签(<?php);
// 2、改正$HTTP_GET_VARS($_GET),$HTTP_POST_VARS($_POST)以配合PHP高版本;
// 3、增加$_SESSION $_COOKIE检测
// 4、增加几个检测组件(simplexml\sqlite\openssl...)
// 5、增加PEAR系列组件的检测]
// 6、增加服务器信息数组$_SERVER $_SESSION $_COOKIE列表
// 7、添加lmx的服务器性能数据,去掉广告
//-----------------------------------------------------------------------------
// 本程序使用方法:
// 首先你可以把下面的两个变量修改成你自已的,然后上传至服务器并且修改属性为755,
// 最后在浏览器中输入本文件地址就可以了。
//-----------------------------------------------------------------------------

// =================== 以下变量为用户选项,请更据你的具体情况设置 ====================
$admessage = "本探针是用来测试PHP环境信息<br />".
"---->>> PHP information <<<----";
// 如果这个探针你是用来演示的,你可以在上面变量中输入相关信息(会显示在页面底部,支持html)
$defstyle = "sim";
// 上面的变量为设置默认的风格(sim=[灰色天空],yel=[粉色情人],sum=[清爽夏日])
// ============================================================================

error_reporting(E_CORE_ERROR);
set_time_limit(0);
echo "测试COOKIE: <a href='?what=COOKIE&mode=start'><b>start</b></a> <a href='?what=COOKIE&mode=add'><b>add</b></a> <a href='?what=COOKIE&mode=end'><b>end</b></a>";
if (@$_GET['what']=="COOKIE") test_interface($_GET['what'],$_GET['mode']);
echo " 测试SESSION: <a href='?what=session&mode=start'><b>start</b></a> <a href='?what=session&mode=add'><b>add</b></a> <a href='?what=session&mode=end'><b>end</b></a>";
if (@$_GET['what']=="session") test_interface($_GET['what'],$_GET['mode']);
header("Content-Type: text/html; charset=gb2312");
$mtime = explode(" ", microtime());
$starttime = $mtime[1] + $mtime[0];
if(!get_cfg_var("register_globals")){
if (!isset($HTTP_GET_VARS))
$HTTP_GET_VARS = $_GET;
if (!isset($HTTP_POST_VARS))
$HTTP_POST_VARS = $_POST;

foreach($HTTP_GET_VARS as $key => $val){
$$key = $val;
}
foreach($HTTP_POST_VARS as $key => $val){
$$key = $val;
}
}
if(!$style)$style = $defstyle;
$PHP_SELF = $HTTP_SERVER_VARS[PHP_SELF] ? $HTTP_SERVER_VARS[PHP_SELF] : $HTTP_SERVER_VARS[SCRIPT_NAME];
$admessage .= "<a href=\"$PHP_SELF?style=$style\" title=\"刷新本页\">刷新</a>";
$phpos = PHP_OS;
if($phpos=="BSD" || $phpos=="FreeBSD" || $phpos=="Linux" ||$phpos=="NetBSD" || $phpos=="OpenBSD" || $phpos=="Darwin"){
$osinfo = uptime();
}else{
$osinfo = "对不起".$phpos."系统不支持";
}
if(get_cfg_var("safemode")){
$safemode = "是";
}else {
$safemode = "否";
}
if (get_cfg_var("file_uploads") == "1"){
$upsize = get_cfg_var("upload_max_filesize");
}else {
$upsize = "不允许上传";
}
if (isset($_SERVER["SERVER_ADMIN"])){
$adminmail = "<a href=\"mailto:".$_SERVER["SERVER_ADMIN"]."\" title=\"发送邮件\">".$_SERVER["SERVER_ADMIN"]."</a>";
}else{
$adminmail = "<a href=\"mailto:".get_cfg_var("sendmail_from")."\" title=\"发送邮件\">".get_cfg_var("sendmail_from")."</a>";
}
$dis_func = get_cfg_var("disable_functions");
if ($dis_func == ""){
$dis_func = "<span class=\"false\" ><b>×</b></span>";
}else {
$dis_func = str_replace(" ","<br />",$dis_func);
$dis_func = str_replace(",","<br />",$dis_func);
}
if(ereg("phpinfo",$dis_func)){
$phpinfo = "<span class=\"false\"><b>×</b></span><span class=\"s\">PHPINFO</span>";
}else{
$phpinfo = "<span class=\"ture\"><b>√</b></span><a href=\"$PHP_SELF?style=$style&testinfo=phpinfo#bottom\" title=\"点此查看PHPINFO细信息\">PHPINFO</a>";
}

// -----------------------------------------------------------
function find_program ($program)
{
$path = array('/bin', '/sbin', '/usr/bin', '/usr/sbin', '/usr/local/bin', '/usr/local/sbin');
while ($this_path = current($path)) {
if (is_executable("$this_path/$program")) {
return "$this_path/$program";
}
next($path);
}
return;
}
function test_interface ($what,$mode){
if ($what == "session"){
if ($mode=='start') { $_SESSION['test_session_temp'] = 1;echo ' :: $_SESSION["test_session_temp"] ='.$_SESSION['test_session_temp'];}
if ($mode=='add') { $_SESSION['test_session_temp'] ++;echo ' :: $_SESSION["test_session_temp"] ='.$_SESSION['test_session_temp'];}
if ($mode=='end') { unset($_SESSION['test_session_temp']); echo ' :: $_SESSION["test_session_temp"] is ';var_dump($_SESSION['test_session_temp']);}
}else{
if ($mode=='start') { $value = 1;setcookie("TestCookie", $value, time()+60);echo ' :: $_COOKIE["TestCookie"] = '.$_COOKIE["TestCookie"];
}
if ($mode=='add') { $_COOKIE["TestCookie"]++;setcookie("TestCookie", $_COOKIE["TestCookie"], time()+30); echo ' :: $_COOKIE["TestCookie"] = '.$_COOKIE["TestCookie"];}
if ($mode=='end') { setcookie ("TestCookie", "", time() - 3600);echo ' :: $_COOKIE["TestCookie"] = '.$_COOKIE["TestCookie"];
}
}
}

function execute_program ($program, $args = '')
{
$buffer = '';
$program = find_program($program);
if (!$program) { return; }
// see if we've gotten a |, if we have we need to do patch checking on the cmd
if ($args) {
$args_list = split(' ', $args);
for ($i = 0; $i < count($args_list); $i++) {
if ($args_list[$i] == '|') {
$cmd = $args_list[$i+1];
$new_cmd = find_program($cmd);
$args = ereg_replace("\| $cmd", "| $new_cmd", $args);
}
}
}
}
function grab_key ($key)
{
return execute_program('sysctl', "-n $key");
}
function get_sys_ticks ()
{
$s = explode(' ', grab_key('kern.boottime'));
$a = ereg_replace('{ ', '', $s[3]);
$sys_ticks = time() - $a;
return $sys_ticks;
}
function uptime ()
{
if(PHP_OS=="Linux"){
$fd = fopen('/proc/uptime', 'r');
$ar_buf = split(' ', fgets($fd, 4096));
fclose($fd);
$sys_ticks = trim($ar_buf[0]);
}else{
$sys_ticks = get_sys_ticks();
}
$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) {
$result = "".$days."日";
}
if ($hours != 0) {
$result .= "".$hours."小时";
}
$result .= "".$min."分钟";
return "$result";
}
// -----------------------------------------------------------
function gettimeout(){
GLOBAL $starttime;
$mtime = explode(" ", microtime());
$endtime = $mtime[1] + $mtime[0];
$totaltime = ($endtime - $starttime);
$totaltime = number_format($totaltime, 7);
$debuginfo = "Processed in $totaltime second(s)";
return $debuginfo;
}

function issupp($func_name,$func="function_exists")
{
if ($func($func_name)){
$su = "<span class=\"ture\"><b>√</b></span>";
}else {
$su = "<span class=\"false\"><b>x</b></span>";
}
return $su;
}

function int_test()
{
$time_start=gettimeofday();
for($index=0;$index<=3000000;$index++);
{
$count=1+1;
}
$time_end=gettimeofday();
$time=($time_end["usec"]-$time_start["usec"])/1000000;
$time=$time+$time_end["sec"]-$time_start["sec"];
$time=round($time*1000)/1000;
return($time);
}

function float_test()
{
$test=pi();
$time_start=gettimeofday();
for($index=0;$index<=3000000;$index++);
{
sqrt($test);
}
$time_end=gettimeofday();
$time=($time_end["usec"]-$time_start["usec"])/1000000;
$time=$time+$time_end["sec"]-$time_start["sec"];
$time=round($time*1000)/1000;
return($time);
}

function io_test()
{
global $PHP_SELF;
$fp=fopen(".$PHP_SELF","r");
$time_start=gettimeofday();
for($index=0;$index<10000;$index++)
{
fread($fp,10240);
rewind($fp);
}
$time_end=gettimeofday();
fclose($fp);
$time=($time_end["usec"]-$time_start["usec"])/1000000;
$time=$time+$time_end["sec"]-$time_start["sec"];
$time=round($time*1000)/1000;
return($time);
}
if ($test)
{
switch($test)
{
case "int":
$vint = int_test();
break;
case "float":
$vfloat = float_test();
break;
case "io":
$vio = io_test();
break;
}
}
function te_val($val){
if($val){
if($val == '0'){
$vale = "小于0.001秒";
}else{
$vale = $val."秒";
}
}else{
$vale = "未测试";
}
return $vale;
}


if($style == "sim"){
$skin[bdcolor] = "#ffffff"; // 底色
$skin[tdfont] = "#666666"; // 表格里字体颜色
$skin[tdborder] = "#cccccc"; // 边框颜色
$skin[tdbg] = "#fcfcfc"; // 表格里背景色
$skin[flink] = "#336699"; // 链接颜色
$skin[fhove] = "#b4c8d8"; // 访问时颜色
}elseif($style == "red"){
$skin[bdcolor] = "#FFCC99"; // 底色
$skin[tdfont] = "#333333"; // 表格里字体颜色
$skin[tdborder] = "#FF6600"; // 边框颜色
$skin[tdbg] = "#FFAC84"; // 表格里背景色
$skin[flink] = "#FF3399"; // 链接颜色
$skin[fhove] = "#FF9999"; // 访问时颜色
}elseif($style == "blu"){
$skin[bdcolor] = "#DAFEEC"; // 底色
$skin[tdfont] = "#626262"; // 表格里字体颜色
$skin[tdborder] = "#009900"; // 边框颜色
$skin[tdbg] = "#D1FCF9"; // 表格里背景色
$skin[flink] = "#33CC99"; // 链接颜色
$skin[fhove] = "#0099FF"; // 访问时颜色
}

$info[0] = array("服务器时间",date("Y年m月d日 H:i:s",time()));
$info[1] = array("服务器域名","<a href=\"http://$_SERVER[SERVER_NAME]\" title=\"访问此域名\" target=\"_blank\">$_SERVER[SERVER_NAME]</a>");
$info[2] = array("服务器IP地址",gethostbyname($_SERVER["SERVER_NAME"]));
$info[3] = array("服务器操作系统",PHP_OS);
$info[4] = array("服务器运行时间",$osinfo);
$info[5] = array("服务器操作系统文字编码",$_SERVER["HTTP_ACCEPT_LANGUAGE"]);
$info[6] = array("服务器解译引擎",$_SERVER["SERVER_SOFTWARE"]);
$info[7] = array("Web服务端口",$_SERVER["SERVER_PORT"]);
$info[8] = array("PHP运行方式",strtoupper(php_sapi_name()));
$info[9] = array("PHP版本(Zend版本)",PHP_VERSION."(".zend_version().")");
$info[10] = array("运行于安全模式",$safemode);
$info[11] = array("服务器管理员",$adminmail);
$info[12] = array("本文件路径",$_SERVER["SCRIPT_FILENAME"]);
$info[13] = array("允许使用URL打开文件allow_url_fopen",issupp("allow_url_fopen","get_cfg_var"));
$info[14] = array("允许动态加载链接库enable_dl",issupp("enable_dl","get_cfg_var"));
$info[15] = array("显示错误信息display_errors",issupp("display_errors","get_cfg_var"));
$info[16] = array("自动定义全局变量register_globals",issupp("register_globals","get_cfg_var"));
$info[17] = array("程序最多允许使用内存量memory_limit",get_cfg_var("memory_limit"));
$info[18] = array("POST最大字节数post_max_size",get_cfg_var("post_max_size"));
$info[19] = array("允许最大上传文件upload_max_filesize",$upsize);
$info[20] = array("程序最长运行时间max_execution_time",get_cfg_var("max_execution_time")."秒");
$info[21] = array("被禁用的函数disable_functions",$dis_func);
$info[22] = array("PHP信息PHPINFO",$phpinfo);
$info[23] = array("目前还有空余空间diskfreespace",intval(diskfreespace(".") / (1024 * 1024)).'Mb');
$info[24] = array("拼写检查 ASpell Library",issupp("aspell_new"));
$info[25] = array("高精度数学运算 BCMath",issupp("bcadd"));
$info[26] = array("历法运算 Calendar",issupp("JDToGregorian"));
$info[27] = array("DBA数据库",issupp("dba_close"));
$info[28] = array("dBase数据库",issupp("dbase_close"));
$info[29] = array("DBM数据库",issupp("dbmclose"));
$info[30] = array("FDF表单资料格式 Forms Data Format",issupp("FDF_close"));
$info[31] = array("FilePro数据库",issupp("filepro"));
$info[32] = array("Hyperwave数据库",issupp("hw_close"));
$info[33] = array("图形处理 GD Library",issupp("imageline"));
$info[34] = array("IMAP电子邮件系统",issupp("imap_close"));
$info[35] = array("Informix数据库",issupp("ifx_close"));
$info[36] = array("InterBase数据库",issupp("ibase_close"));
$info[37] = array("LDAP目录协议",issupp("ldap_close"));
$info[38] = array("MCrypt加密处理",issupp("mcrypt_cbc"));
$info[39] = array("哈稀计算 MHash",issupp("mhash"));
$info[40] = array("mSQL数据库",issupp("msql_close"));
$info[41] = array("SQL Server数据库",issupp("mssql_close"));
$info[42] = array("MySQL数据库",issupp("mysql_close"));
$info[43] = array("SyBase数据库",issupp("sybase_close"));
$info[44] = array("Yellow Page系统",issupp("yp_match"));
$info[45] = array("Oracle数据库",issupp("ora_close"));
$info[46] = array("Oracle 8 数据库",issupp("OCILogOff"));
$info[47] = array("PREL相容语法 PCRE",issupp("preg_match"));
$info[48] = array("PDF文档支持",issupp("pdf_close"));
$info[49] = array("Postgre SQL数据库",issupp("pg_close"));
$info[50] = array("SNMP网络管理协议",issupp("snmpget"));
$info[51] = array("VMailMgr邮件处理",issupp("vm_adduser"));
$info[52] = array("WDDX支持(Web Distributed Data Exchange)",issupp("wddx_add_vars"));
$info[53] = array("压缩文件支持(Zlib)",issupp("gzclose"));
$info[54] = array("XML解析",issupp("xml_set_object"));
$info[55] = array("FTP",issupp("ftp_login"));
$info[56] = array("ODBC数据库连接",issupp("odbc_close"));
$info[57] = array("Session支持",issupp("session_start"));
$info[58] = array("Socket支持",issupp("fsockopen"));
$info[59] = array("增强MySQL数据库(php5)",issupp("mysqli_close"));
$info[60] = array("SQLite数据库",issupp("sqlite_close"));
$info[61] = array("XMLRPC解析",issupp("xmlrpc_server_create"));
$info[62] = array("SimpleXML解析",issupp("simplexml_load_string"));
$info[63] = array("OpenSSL支持",issupp("openssl_get_privatekey"));
$info[64] = array("cPDF文档支持",issupp("cpdf_page_init"));
$info[65] = array("DOMXML支持(php4)",issupp("domxml_open_file"));
$info[66] = array("ICONV支持(iconv)",issupp("iconv"));
?>
<!--┌─────────────────── C1G的PHP探针 ──────────────────────┐-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta name="author" content="www.flymote.com" />
<meta name="description" content="php探针" />
<title>PHP探针</title>
<style type="text/css">
td {font-size:8pt; color: <?php echo $skin[tdfont]?>;font-family:Verdana}
input {BORDER-RIGHT: <?php echo $skin[tdborder]?> 1px solid; BORDER-TOP: <?php echo $skin[tdborder]?> 1px solid; BORDER-LEFT: <?php echo $skin[tdborder]?> 1px solid; COLOR: <?php echo $skin[tdfont]?>; BORDER-BOTTOM: <?php echo $skin[tdborder]?> 1px solid; BACKGROUND-COLOR: <?php echo $skin[bdcolor]?>}
body {text-align: center; left: 0px; top: 200px; font-size:8pt; color: <?php echo $skin[tdfont]?>;font-family:Verdana; SCROLLBAR-FACE-COLOR: #ffffff; background color:<?php echo $skin[bdcolor]?>;cursor:SCROLLBAR-HIGHLIGHT-COLOR: #ffffff; SCROLLBAR-SHADOW-COLOR: #aaaaaa; SCROLLBAR-3DLIGHT-COLOR: #aaaaaa; SCROLLBAR-ARROW-COLOR: #dddddd; SCROLLBAR-TRACK-COLOR: #ffffff; SCROLLBAR-DARKSHADOW-COLOR: #ffffff }
a:link {text-decoration:none; color:<?php echo $skin[flink]?>}
a:visited {text-decoration:none; color:<?php echo $skin[flink]?>}
a:active {text-decoration:none; color:<?php echo $skin[flink]?>}
a:hover {COLOR: <?php echo $skin[fhove]?>; }
.tb {BORDER-RIGHT: <?php echo $skin[tdborder]?> 1px solid; BORDER-TOP: <?php echo $skin[tdborder]?> 1px solid; BORDER-LEFT: <?php echo $skin[tdborder]?> 1px solid; BORDER-BOTTOM: <?php echo $skin[tdborder]?> 1px solid;background-color:<?php echo $skin[tdborder]?>}
.tb0 {BORDER-RIGHT: <?php echo $skin[tdborder]?> 1px solid; BORDER-TOP: <?php echo $skin[tdborder]?> 1px solid; BORDER-LEFT: <?php echo $skin[tdborder]?> 1px solid; BORDER-BOTTOM: <?php echo $skin[tdborder]?> 1px solid;background-color:<?php echo $skin[tdbg]?>}
.tb1 {background-color:<?php echo $skin[bdcolor]?>}
.ture {color: green}
.false {color:red}
.u {text-decoration: underline}
.s {text-decoration: line-through}
</style>
</head>
<body >
<div id="top" style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px">
<table width="750" border="0" cellpadding="0" cellspacing="1" >
<tr class="tb"><td align="left">
<table width="100%" border="0" cellpadding="2" cellspacing="1" style="background-color:<?php echo $skin[bdcolor]?>;">
<tr><td>
<table width="100%" border="0" cellpadding="2" cellspacing="1" style="background-color:<?php echo $skin[bdcolor]?>;">
<tr><td style="width:230" >
<div id="gosite" style="CURSOR: hand;" onclick="window.open('http://www.flymote.com')">
<p style="MARGIN-TOP: 0px; MARGIN-BOTTOM: -8px">&nbsp;<strong style="font-size: 14pt">PHP 探针</strong><span style=" color:#666666"> 李茂祥 修改版</span></p></div></td>
<td align="right" style="width:10" valign="top">
<a href="<?php echo $PHP_SELF?>?style=sim" title="灰白风格"><span style="color:#cccccc">■</span></a>
<a href="<?php echo $PHP_SELF?>?style=red" title="棕色风格"><span style="color:#FF9933">■</span></a>
<a href="<?php echo $PHP_SELF?>?style=blu" title="浅绿风格"><span style="color:#66FFFF">■</span></a>
</td><td class="tb0">
<?php echo $admessage?>
</td></tr>
</table>
</td></tr>
</table>
</td></tr>
<tr class="tb"><td align="left">
<table width="100%" border="0" cellpadding="2" cellspacing="1" style="background-color:<?php echo $skin[tdborder]?>;">
<tr><td class="tb1">
<table width="100%" border="0" cellpadding="0" cellspacing="1" >
<tr>
<td style="width:80" ><a href="#server">服务器特性</a></td>
<td style="width:80"><a href="#php">PHP基本特性</a></td>
<td style="width:80"><a href="#basic">组件支持状况</a></td>
<td style="width:80"><a href="#define">电子邮件检测</a></td>
<td style="width:80"><a href="#power">性能检测</a></td>
<td style="width:80"><a href="#pear">PEAR 检测</a></td>
<td style="width:80"><a href="#SERVERinfo">服务器参数</a></td>
<td style="width:80"><?php echo $phpinfo?></td>
</tr>
</table>
</td></tr>
</table>
</td></tr>
<tr><td>
<?php
for($a=0;$a<7;$a++){
if($a == 0){
$hp = array("server","服务器特性");
}elseif($a == 1){
$hp = array("php","PHP基本特性");
}elseif($a == 2){
$hp = array("basic","组件支持状况");
}elseif($a == 3){
$hp = array("define","电子邮件检测");
}elseif($a == 4){
$hp = array("power"," 服务器性能检测 ");
}elseif($a == 5){
$hp = array("pear"," PEAR 检测 ");
}elseif($a == 6){
$hp = array("SERVERinfo"," 服务器参数 ");
}
?>
<a name="<?php echo $hp[0]?>"></a>
<table width="100%" border="0" cellpadding="0" cellspacing="1" >
<tr><td>
<table width="100%" border="0" cellpadding="4" cellspacing="0" >
<tr><td class="tb0" style="width:100" align="center"><?php echo $hp[1]?></td><td></td></tr>
</table>
</td></tr>
<tr><td>
<table width="100%" border="0" cellpadding="2" cellspacing="1" style="background-color:<?php echo $skin[tdborder]?>;">
<tr><td class="tb1">
<table width="100%" border="1" cellpadding="2" cellspacing="1" >
<?php
if($a == 0){
for($i=0;$i<=12;$i++){
echo "<tr align=\"left\"><td style=\"width:30%\">".$info[$i][0]."</td><td style=\"width:70%\">".$info[$i][1]."</td></tr>\n";
}
}elseif($a == 1){
for($i=13;$i<=23;$i++){
echo "<tr align=\"left\"><td style=\"width:70%\">".$info[$i][0]."</td><td style=\"width:30%\">".$info[$i][1]."</td></tr>\n";
}
}elseif($a == 2){
for($i=24;$i<=66;$i++){
echo "<tr align=\"left\"><td style=\"width:70%\">".$info[$i][0]."</td><td style=\"width:30%\">".$info[$i][1]."</td></tr>\n";
}
}elseif($a == 3){
?>
<tr><td>
<a name="<?php echo $hp[0]?>"></a>
<table border="0" width="100%" cellspacing="1" cellpadding="1">
<form name="form1" action="<?php echo $PHP_SELF?>#define" method="post" >
<tr><td align="center" style="height:30" >
<input name="ft" value="check" type="hidden" />
<input name="style" value="<?php echo $style?>" type="hidden" />
测试电子邮件:<input class="input" type="text" value="" name="email" size="20" />
 <input type="submit" value="确定" class="backc" name="submit1" />
<input type="reset" value="重填" class="backc" name="reset1" />
</td></tr></form>
</table>
</td></tr>
<?php if($ft=='check'){
$to = @$_POST['email'];
$subject = 'the subject';
$message = 'hello';
$headers = 'From: webmaster@' . $_SERVER['SERVER_NAME'] . "\r\n" .
'Reply-To: webmaster@' . $_SERVER['SERVER_NAME'] . "\r\n" .
'X-Mailer: PHP/' . phpversion();
if ( !empty($_POST['email']) )
if (mail($to, $subject, $message, $headers))
$email_note = "测试发送电子邮件$to 成功";
else
$email_note = "测试发送电子邮件$to 失败!";
if ( !empty($_POST['email']) )
echo '<tr align="center" ><td align="left" style="height:18">&nbsp;电子邮件测试</td><td align="left">&nbsp;'.$email_note.'</td></tr>';?>
</td></tr>
<?php
}
}elseif($a == 4){
?>
<tr><td>
<a name="<?php echo $hp[0]?>"></a>
<table width="100%" border="0" cellspacing="2" cellpadding="1">
<?php
for($j=0;$j<3;$j++){
if($j == 0) {
$do = "int";
if($vfloat) $otval = "<input type=\"hidden\" name=\"vfloat\" value=\"$vfloat\" />\n";
if($vio) $otval .= "<input type=\"hidden\" name=\"vio\" value=\"$vio\" />\n";
$show = $vint ? "重新测试" : "测试";
$pval = array("1.782秒","5.603秒","67.371秒","1.456秒","1.319秒",te_val($vint));
$phead = "整数运算能力测试(1+1运算300万次)";
}elseif($j == 1){
$do = "float";
$otval = "";
if($vint) $otval = "<input type=\"hidden\" name=\"vint\" value=\"$vint\" />\n";
if($vio) $otval .= "<input type=\"hidden\" name=\"vio\" value=\"$vio\" />\n";
$show = $vfloat ? "重新测试" : "测试";
$pval = array("1.821秒","2.618秒","29.44秒","1.291秒","1.315秒",te_val($vfloat));
$phead = "浮点运算能力测试(开平方300万次)";
}elseif($j == 2){
$do = "io";
$otval = "";
if($vfloat) $otval = "<input type=\"hidden\" name=\"vfloat\" value=\"$vfloat\" />\n";
if($vint) $otval .= "<input type=\"hidden\" name=\"vint\" value=\"$vint\" />\n";
$show = $vio ? "重新测试" : "测试";
$pval = array("0.073秒","0.128秒","0.332秒","0.092秒","0.053秒",te_val($vio));
$phead = "数据I/O能力测试(读取10K文件10000次)";
}
?>
<tr class="myhead" align="left">
<td colspan="2" ><b><?php echo $phead?></b></td>
</tr>
<tr class="mytr" align="left">
<td style="width:70%" >C1G的电脑(6C/1.4G+128M+Win2000)</td>
<td style="width:30%" ><?php echo $pval[0]?></td>
</tr>
<tr class="mytr" align="left">
<td style="width:70%" >zanadoo.com(C1.3G+256M+Linux)(2003/03/15 17:58)</td>
<td style="width:30%" ><?php echo $pval[1]?></td>
</tr>
<tr class="mytr" align="left">
<td>51.net虎翼网A型(598MHz+SCSI)(2003/03/15 17:28)</td>
<td><?php echo $pval[2]?></td>
</tr>
<tr class="mytr" align="left">
<td>有个网络风PHP型(2003/03/15 17:36)</td>
<td><?php echo $pval[3]?></td>
</tr>
<tr class="mytr" align="left">
<td>LMX的电脑(Athon xp+ 2200 256M Winxp PHP5.0.3+apache2+SSL)</td>
<td><?php echo $pval[4]?></td>
</tr>
<tr class="mytr" align="left" valign="top">
<td>
<form name="test<?php echo $j?>" method="post" action="<?php echo $PHP_SELF?>#power">
这台服务器<?php echo $otval?>
<input name="style" value="<?php echo $style?>" type="hidden" />
<input type="hidden" name="test" value="<?php echo $do?>" />
[<a href="javascript:test<?php echo $j?>.submit()"><?php echo $show?></a>]
</form>
</td>
<td><?php echo $pval[5]?></td>
</tr>
<?php }?>
</table>
</td></tr>
<?php
}elseif($a == 5){
?>
<tr><td>
<a name="<?php echo $hp[0]?>"></a>
<table width="100%" border="0" cellspacing="2" cellpadding="1">
<tr><td><?php echo " PEAR 基础类 :: ".(class_exists("PEAR")?"<font color=green>可用</font>":"<font color=red>未装</font>")?></td></tr>
<tr><td><?php @include_once "PEAR/Info.php";echo " PEAR info :: ".(class_exists("PEAR_Info")?"<font color=green>可用</font>":"<font color=red>未装</font>")?></td></tr>
<tr><td><?php @include_once "Config.php"; echo " PEAR Config :: ".(class_exists("Config")?"<font color=green>可用</font>":"<font color=red>未装</font>")?></td></tr>
<tr><td><?php @include_once "DB.php"; echo " PEAR DB :: ".(class_exists("DB")?"<font color=green>可用</font>":"<font color=red>未装</font>")?></td></tr>
<tr><td><?php @include_once "MDB.php"; echo " PEAR MDB :: ".(class_exists("MDB")?"<font color=green>可用</font>":"<font color=red>未装</font>")?></td></tr>
<tr><td><?php @include_once "LOG.php"; echo " PEAR Logging :: ".(class_exists("LOG")?"<font color=green>可用</font>":"<font color=red>未装</font>")?></td></tr>
<tr><td><?php @include_once "Calendar.php"; echo " PEAR Calendar :: ".(class_exists("PEAR")?"<font color=green>可用</font>":"<font color=red>未装</font>")?></td></tr>
<tr><td><?php @include_once "Crypt/CHAP.php"; echo " PEAR Crypt_CHAP:(Crypt_CHAP_MD5 /Crypt_CHAP_MSCHAPv1/Crypt_CHAP_MSCHAPv2) :: ".(class_exists("Crypt_CHAP_MD5")?"<font color=green>可用</font>":"<font color=red>未装</font>")?></td></tr>
<tr><td><?php @include_once "Spreadsheet/Excel/Writer.php"; echo " PEAR Spreadsheet_Excel_Writer :: ".(class_exists("Worksheet")?"<font color=green>可用</font>":"<font color=red>未装</font>")?></td></tr>
<tr><td><?php @include_once "Archive/Tar.php"; echo " PEAR Archive_Tar :: ".(class_exists("Archive_Tar")?"<font color=green>可用</font>":"<font color=red>未装</font>")?></td></tr>
<tr><td><?php @include_once "File.php"; echo " PEAR File :: ".(class_exists("File")?"<font color=green>可用</font>":"<font color=red>未装</font>")?></td></tr>
<tr><td><?php @include_once "File/Find.php"; echo " PEAR File_Find :: ".(class_exists("File_Find")?"<font color=green>可用</font>":"<font color=red>未装</font>")?></td></tr>
<tr><td><?php @include_once "File/Passwd.php"; echo " PEAR File_Passwd :: ".(class_exists("File_Passwd")?"<font color=green>可用</font>":"<font color=red>未装</font>")?></td></tr>
<tr><td><?php @include_once "File/SearchReplace.php"; echo " PEAR File_SearchReplace :: ".(class_exists("File_SearchReplace")?"<font color=green>可用</font>":"<font color=red>未装</font>")?></td></tr>
<tr><td><?php @include_once "File_HtAccess.php"; echo " PEAR File_HtAccess :: ".(class_exists("File_HtAccess")?"<font color=green>可用</font>":"<font color=red>未装</font>")?></td></tr>
<tr><td><?php @include_once "HTML/Form.php"; echo " PEAR HTML_Form :: ".(class_exists("HTML_Form")?"<font color=green>可用</font>":"<font color=red>未装</font>")?></td></tr>
<tr><td><?php @include_once "HTML/Menu.php"; echo " PEAR HTML_Menu :: ".(class_exists("HTML_Menu")?"<font color=green>可用</font>":"<font color=red>未装</font>")?></td></tr>
<tr><td><?php @include_once "HTML/QuickForm.php"; echo " PEAR HTML_QuickForm :: ".(class_exists("HTML_QuickForm")?"<font color=green>可用</font>":"<font color=red>未装</font>")?></td></tr>
<tr><td><?php @include_once "HTML/Template/IT.php"; echo " PEAR HTML_Template_IT :: ".(class_exists("HTML_Template_IT")?"<font color=green>可用</font>":"<font color=red>未装</font>")?></td></tr>
<tr><td><?php @include_once "HTML/Table.php"; echo " PEAR HTML_Table :: ".(class_exists("HTML_Table")?"<font color=green>可用</font>":"<font color=red>未装</font>")?></td></tr>
<tr><td><?php @include_once "Pager/Pager.php"; echo " PEAR Pager :: ".(class_exists("Pager")?"<font color=green>可用</font>":"<font color=red>未装</font>")?></td></tr>
<tr><td><?php @include_once "Pager/Sliding.php"; echo " PEAR Pager_Sliding :: ".(class_exists("Pager_Sliding")?"<font color=green>可用</font>":"<font color=red>未装</font>")?></td></tr>
<tr><td><?php @include_once "HTTP.php"; echo " PEAR HTTP :: ".(class_exists("HTTP")?"<font color=green>可用</font>":"<font color=red>未装</font>")?></td></tr>
<tr><td><?php @include_once "HTTP/Compress.php"; echo " PEAR HTTP_Compress :: ".(class_exists("HTTP_Compress")?"<font color=green>可用</font>":"<font color=red>未装</font>")?></td></tr>
<tr><td><?php @include_once "HTTP/Download.php"; echo " PEAR HTTP_Download :: ".(class_exists("HTTP_Download")?"<font color=green>可用</font>":"<font color=red>未装</font>")?></td></tr>
<tr><td><?php @include_once "Mail.php"; echo " PEAR Mail :: ".(class_exists("Mail")?"<font color=green>可用</font>":"<font color=red>未装</font>")?></td></tr>
<tr><td><?php @include_once "Mail/Mime.php"; echo " PEAR Mail_Mime :: ".(class_exists("Mail_Mime")?"<font color=green>可用</font>":"<font color=red>未装</font>")?></td></tr>
<tr><td><?php @include_once "Net/CheckIP.php"; echo " PEAR Net_CheckIP :: ".(class_exists("Net_CheckIP")?"<font color=green>可用</font>":"<font color=red>未装</font>")?></td></tr>
<tr><td><?php @include_once "Net/Finger.php"; echo " PEAR Net_Finger :: ".(class_exists("Net_Finger")?"<font color=green>可用</font>":"<font color=red>未装</font>")?></td></tr>
<tr><td><?php @include_once "Net/FTP.php"; echo " PEAR Net_FTP :: ".(class_exists("Net_FTP")?"<font color=green>可用</font>":"<font color=red>未装</font>")?></td></tr>
<tr><td><?php @include_once "Net/IPv6.php"; echo " PEAR Net_IPv6 :: ".(class_exists("Net_IPv6")?"<font color=green>可用</font>":"<font color=red>未装</font>")?></td></tr>
<tr><td><?php @include_once "Net/NNTP.php"; echo " PEAR Net_NNTP :: ".(class_exists("Net_NNTP")?"<font color=green>可用</font>":"<font color=red>未装</font>")?></td></tr>
<tr><td><?php @include_once "Net/Net_POP3.php"; echo " PEAR Net_POP3 :: ".(class_exists("Net_POP3")?"<font color=green>可用</font>":"<font color=red>未装</font>")?></td></tr>
<tr><td><?php @include_once "Net/Portscan.php"; echo " PEAR Net_Portscan :: ".(class_exists("Net_Portscan")?"<font color=green>可用</font>":"<font color=red>未装</font>")?></td></tr>
<tr><td><?php @include_once "Net/Server.php"; echo " PEAR Net_Server :: ".(class_exists("Net_Server")?"<font color=green>可用</font>":"<font color=red>未装</font>")?></td></tr>
<tr><td><?php @include_once "Net/Socket.php"; echo " PEAR Net_Socket :: ".(class_exists("Net_Socket")?"<font color=green>可用</font>":"<font color=red>未装</font>")?></td></tr>
<tr><td><?php @include_once "Net/Whois.php"; echo " PEAR Net_Whois :: ".(class_exists("Net_Whois")?"<font color=green>可用</font>":"<font color=red>未装</font>")?></td></tr>
<tr><td><?php @include_once "PHPUnit.php"; echo " PEAR PHPUnit :: ".(class_exists("PHPUnit")?"<font color=green>可用</font>":"<font color=red>未装</font>")?></td></tr>
<tr><td><?php @include_once "XML/Transformer.php"; echo " PEAR XML_Transformer :: ".(class_exists("XML_Transformer")?"<font color=green>可用</font>":"<font color=red>未装</font>")?></td></tr>
<tr><td><?php @include_once "XML/RPC.php"; echo " PEAR XML_RPC :: ".(class_exists("XML_RPC_Message")?"<font color=green>可用</font>":"<font color=red>未装</font>")?></td></tr>
<tr><td><?php @include_once "Serializer.php"; echo " PEAR XML_Serializer :: ".(class_exists("XML_Serializer")?"<font color=green>可用</font>":"<font color=red>未装</font>")?></td></tr>
<tr><td><?php @include_once "XML/RSS.php"; echo " PEAR XML_RSS :: ".(class_exists("XML_RSS")?"<font color=green>可用</font>":"<font color=red>未装</font>")?></td></tr>
<tr><td><?php @include_once "XML/sql2xml.php"; echo " PEAR XML_sql2xml :: ".(class_exists("XML_sql2xml")?"<font color=green>可用</font>":"<font color=red>未装</font>")?></td></tr>
</table>
</td></tr>
<?php }elseif($a == 6){
?>
<tr><td>
<a name="<?php echo $hp[0]?>"></a>
<table width="100%" border="0" cellspacing="2" cellpadding="1">
<tr><td><b>$_SERVER全局数组<a name="SERVERinfo" id="SERVERinfo"></a></b></td></tr>
<tr><td class="tb0">
<?php
foreach ($_SERVER as $key => $value)
echo "<b>$key </b>=\"$value\"<br />\n";
?>
</td></tr><tr><td><b>$_SESSION 全局数组</b></td></tr>
<tr><td class="tb0">
<?php
foreach ($_SESSION as $key => $value)
echo "<b>$key </b>=\"$value\"<br />\n";
?>
</td></tr><tr><td><b>$_COOKIE 全局数组</b></td></tr>
<tr><td class="tb0">
<?php
foreach ($_COOKIE as $key => $value)
echo "<b>$key </b>=\"$value\"<br />\n";
?>
</td></tr>
</table>
</td></tr>
<?php }?>
</table>
</td></tr>
</table>
</td></tr>
</table>
<?php
}
?>
</td></tr>
<tr><td>
<table width="100%" border="0" cellspacing="1" cellpadding="1">
<tr>
<td style="width:320"><p style="MARGIN-TOP: 0px">&nbsp;<span style="FONT-SIZE: 7pt; color:#333333;ext-decoration: underline">Powered by LiMaoXiang 李茂祥 (基于C1G的PHP探针V2.1)</span></p></td>
<td align="center"><span style="font-size: 7pt; color:#333333"><?php echo gettimeout()?></span></td>
<td align="right"><a href="#top" title="前往顶部">顶部↑</a></td>
</tr>
</table>
</td></tr>
</table>
</div>
<a name="bottom" id="bottom"></a>
</body>
</html>
<?php
if($testinfo)phpinfo();
?>
责任编辑: admin

【最近的搜索】:

上一篇 收藏 打印 收藏夹 下一篇
CopyRight(c) 2007 - 2020 All Rights Reserved  【赣ICP备12001042号】
触屏版 | Archiver 20210915 16:20 | 简介 | 帮助 | 留言 | 关于 | 360网站安全检测平台