php probe
/* +---------------------------------------- ---------------------------------------- | B-Check v0.05.4 | === ===================================== | Southern Third Production | http://www .rubyfans.com | ========================================== | probe Official: None | Last updated: 2010.9.6 11:30 | QQ:307292967 +-------------------------------- -------------------------------------------------- | | During the writing process, I learned from many other excellent probes | and made a lot of modifications and optimizations based on my own understanding. For now, this is the most comprehensive PHP probe for detecting information! | I wrote the entire execution framework wherever I thought without any reasonable planning. I think I will update it further when I have time in the future | +---------- -------------------------------------------------- --------------- */ //Suppress all error messages ini_set('display_errors', 'off'); //Calculate page running time function function getmicrotime(){ list($usec, $sec) = explode(" ",microtime()); return ((float)$usec + (float)$sec); } $pagestartime=getmicrotime(); //Display constants define("on", "Yes ");
define("off", "< ;font color="red">No ");
define("version", "v0.05.4");//Version number
define("overtime" ,"2010.9.6 11:30");//Completion time
//Display switch
$mysqlReShow = "none";
//Use notifications. For the previous versions, notification processing was not possible Reasonable, resulting in a steady stream of notification emails being stuffed into my mailbox.
if($_COOKIE["had_send"] != "yes") {
$messagex="From: http://".$_SERVER['SERVER_NAME'].$_SERVER['PHP_SELF']."nn version: ".version;
$tox="307292967@qq.com";
$subjectx="B-check User - ".version;
mail($tox, $subjectx, $messagex);
setcookie("had_send", "yes");
}
//Refresh performance information results
$ts_int = (false == empty($_POST['tsint']))?$_POST['tsint']:test_int();
$ts_float = (false == empty($_POST['tsfloat']))?$_POST['tsfloat']:test_float();
$ts_io = (false == empty($_POST['tsio']))?$ _POST['tsio']:test_io();
if(isset($_POST['speed']))
{
$speed=round(100/($_POST['speed']/1000),2);
}
elseif($_GET['speed']=="0")
{
$speed=6666.67;
}
elseif(isset($_GET['speed']) and $_GET['speed']> ;0)
{
$speed=round(100/($_GET['speed']/1000),2);
}
else
{
$speed=" Not detected ";
}
//phpinfo() information list
switch ($_GET['action']){
case "phpinfo_GENERAL":
phpinfo(INFO_GENERAL+INFO_ENVIRONMENT+INFO_VARIABLES);
exit;
case "phpinfo_CONFIGURATION":
phpinfo(INFO_CONFIGURATION);
exit;
case "phpinfo_MODULES":
phpinfo(INFO_MODULES);
exit;
case "phpinfo":
phpinfo();
exit;
default:
break;
}
//Form processing
if(isset($_POST['Buginfo']) and $_POST['act']=="Submit"){//Bug submission!
$message=$message."nn from :".$_SERVER['SERVER_NAME'].$_SERVER['PHP_SELF'];
$to="307292967@qq.com";
$subject="Brother Hao, how old are you? ";
$jg=@mail($to, $subject, $message);
$jgprint= (true==$jg)?"Reported successfully! Thank you! ":"Report failed! Write to me: 307292967@qq.com ";
}
elseif($_POST['action']=="Integer operation")
{
$ts_int=test_int();
}
elseif ($_POST['action']=="Floating point operation")
{
$ts_float=test_float();
}
elseif($_POST['action']=="IO test")
{
$ts_io =test_io();
}
elseif($_POST['action']=="Start test")//Internet speed test, waiting for you to complete it.
{
?>
var acd1;
acd1 = new Date();
acd1ok=acd1.getTime();
for($i=1;$i<=1000;$i++){ echo "";
}
?>
var acd2;
acd2 = new Date();
acd2ok=acd2.getTime();
window.location = '?speed=' +(acd2ok-acd1ok)+'#bottom';
} elseif($_POST['action'] == "Connect Mysql") { $mysqlReShow = "show"; $mysqlRe = "MYSQL connection test result:"; $mysqlRe .= (false !==mysql_connect( $_POST['mysqlhost'], $_POST['mysqluser'], $_POST['mysqlpsd']))?"MYSQL server connection is normal ,": "MYSQL server connection failed! , ";
$mysqlRe .= "Database".$_POST['mysqldb']." $mysqlRe .= (false != @mysql_select_db($_POST['mysqldb']))?"The connection is normal ":"< ;font color="red">Connection failed! ";
if(false !==mysql_connect($_POST['mysqlhost'], $_POST['mysqluser'], $_POST['mysqlpsd']))
{
$mysql_version=mysql_get_server_info() ;
}
else
{
$mysql_version="Failed to obtain! ";
}
$mysqlRe .= ", Mysql server version: ";
$mysqlRe .= $mysql_version;
}
elseif($_POST['action'] == "Send")
{
$mailRe = (false !== @mail($_POST["mailReceiver"], "Probe email test", "Successfully sent!"))?"Sending completed< ;/font>":"Failed to send! ";
}
elseif($_POST['action']=="Detection")
{
$funre=$_POST ['funame']." Support:".getfunexists($_POST['funame']);
}
elseif($_POST['action']=="Detection 1")
{
$pmre =$_POST['pm']." Support status:".getvar($_POST['pm']);
}
//Get the Zend Optimizer version, the method refers to the ruined PHP probe
function checkoptimizer ()
{
$url= "http://".$_SERVER['SERVER_NAME'].$_SERVER['PHP_SELF']."?action=phpinfo";
$htmlct=file_get_contents($url);
eregi ("Optimizer v(.*), Copyright", $htmlct, $regs);
$optimizerversion=$regs[1];
$optimizerversion=(''!=$optimizerversion)?$optimizerversion:"< ;font color=red>Failed to obtain! ";
return $optimizerversion;
}
//Get php.ini configuration parameters, refer to iProber
function getvar($varname)
{
switch($var=get_cfg_var($varname)?get_cfg_var($ varname):ini_get($varname))
{
case 0:
return off;
break;
case 1:
return on;
break;
default:
return $var;
break;
}
}
/ /Judge function definition
function getfunexists($funame)
{
return (false !== function_exists($funame))?on:off;
}
//Integer operation test
function test_int()
{
$startime =getmicrotime();
for($i = 0; $i < 3000000; $i++); { $t = 1+1; } $endtime=getmicrotime(); $time=round($ endtime-$startime,4); return $time; } //Floating point operation test function test_float() { $startime=getmicrotime(); for($i = 0; $i < 3000000 ; $i++); { sqrt($t); } $endtime=getmicrotime(); $time=round($endtime-$startime,4); return $time; } //IO Ability test function test_io() { $fp = fopen($_SERVER['PHP_SELF'], "r"); $startime=getmicrotime(); for($i = 0; $i < 300000; $i++); { fread($fp, 10240); rewind($fp); } $endtime=getmicrotime(); $time=round($endtime-$startime,4); return $ time; } //Get disk information, parameters of disk_x_space("y") cannot use variables, @does not work here $diskct=0; $disk=array(); /*if(@disk_total_space ("A:")!=NULL) *To prevent affecting the server, the floppy drive is not checked - what Ajiang said { $diskct=1; $disk["A"]=round((@disk_free_space("A: ")/(1024*1024*1024)),2)."G / ".round((@disk_total_space("A:")/(1024*1024*1024)),2).'G' ; }*/ $diskz=0; //Total disk capacity $diskk=0; //Remaining disk capacity if(@disk_total_space("B:")!=NULL) { $diskct++; $ disk["B"][0]=round(@disk_free_space("B:")/(1024*1024*1024),2).'G'; $disk["B"][1]=round( @disk_total_space("B:")/(1024*1024*1024),2).'G'; $disk["B"][2]=round(((@disk_free_space("B:")/( 1024*1024*1024))/(@disk_total_space("B:")/(1024*1024*1024)))*100,2).'%'; $diskk+=round((@disk_free_space("B: ")/(1024*1024*1024)),2); $diskz+=round((@disk_total_space("B:")/(1024*1024*1024)),2); } if(@disk_total_space ("C:")!=NULL) { $diskct++; $disk["C"][0]=round((@disk_free_space("C:")/(1024*1024*1024)),2 ).'G'; $disk["C"][1]=round((@disk_total_space("C:")/(1024*1024*1024)),2).'G'; $disk[ "C"][2]=round(((@disk_free_space("C:")/(1024*1024*1024))/(@disk_total_space("C:")/(1024*1024*1024)))* 100,2).'%'; $diskk+=round((@disk_free_space("C:")/(1024*1024*1024)),2); $diskz+=round((@disk_total_space("C: ")/(1024*1024*1024)),2); } if(@disk_total_space("D:")!=NULL) { $diskct++; $disk["D"][0]= round((@disk_free_space("D:")/(1024*1024*1024)),2).'G'; $disk["D"][1]=round((@disk_total_space("D:" )/(1024*1024*1024)),2).'G'; $disk["D"][2]=round(((@disk_free_space("D:")/(1024*1024*1024) )/(@disk_total_space("D:")/(1024*1024*1024)))*100,2).'%'; $diskk+=round((@disk_free_space("D:")/(1024* 1024*1024)),2); $diskz+=round((@disk_total_space("D:")/(1024*1024*1024)),2); } if(@disk_total_space("E:") !=NULL) { $diskct++; $disk["E"][0]=round((@disk_free_space("E:")/(1024*1024*1024)),2).'G'; $disk["E"][1]=round((@disk_total_space("E:")/(1024*1024*1024)),2).'G'; $disk["E"][2 ]=round(((@disk_free_space("E:")/(1024*1024*1024))/(@disk_total_space("E:")/(1024*1024*1024)))*100,2).' %'; $diskk+=round((@disk_free_space("E:")/(1024*1024*1024)),2); $diskz+=round((@disk_total_space("E:")/(1024* 1024*1024)),2); } if(@disk_total_space("F:")!=NULL) { $diskct++; $disk["F"][0]=round((@disk_free_space( "F:")/(1024*1024*1024)),2).'G'; $disk["F"][1]=round((@disk_total_space("F:")/(1024*1024 *1024)),2).'G'; $disk["F"][2]=round(((@disk_free_space("F:")/(1024*1024*1024))/(@disk_total_space( "F:")/(1024*1024*1024)))*100,2).'%'; $diskk+=round((@disk_free_space("F:")/(1024*1024*1024)), 2); $diskz+=round((@disk_total_space("F:")/(1024*1024*1024)),2); } if(@disk_total_space("G:")!=NULL) { $diskct++; $disk["G"][0]=round((@disk_free_space("G:")/(1024*1024*1024)),2).'G'; $disk["G"][1]=round((@disk_total_space("G:")/(1024*1024*1024)),2).'G'; $diskk+=round((@disk_free_space("G:")/(1024*1024*1024)),2); $diskz+=round((@disk_total_space("G:")/(1024*1024*1024)),2); } if(@disk_total_space("H:")!=NULL) { $diskct++; $disk["H"][0]=round((@disk_free_space("H:")/(1024*1024*1024)),2).'G'; $disk["H"][1]=round((@disk_total_space("H:")/(1024*1024*1024)),2).'G'; $diskk+=round((@disk_free_space("H:")/(1024*1024*1024)),2); $diskz+=round((@disk_total_space("H:")/(1024*1024*1024)),2); } if(@disk_total_space("I:")!=NULL) { $diskct++; $disk["I"][0]=round((@disk_free_space("I:")/(1024*1024*1024)),2).'G'; $disk["I"][1]=round((@disk_total_space("I:")/(1024*1024*1024)),2).'G'; $diskk+=round((@disk_free_space("I:")/(1024*1024*1024)),2); $diskz+=round((@disk_total_space("I:")/(1024*1024*1024)),2); } if(@disk_total_space("J:")!=NULL) { $diskct++; $disk["J"][0]=round((@disk_free_space("J:")/(1024*1024*1024)),2).'G'; $disk["J"][1]=round((@disk_total_space("J:")/(1024*1024*1024)),2).'G'; $diskk+=round((@disk_free_space("J:")/(1024*1024*1024)),2); $diskz+=round((@disk_total_space("J:")/(1024*1024*1024)),2); } if(@disk_total_space("K:")!=NULL) { $diskct++; $disk["K"][0]=round((@disk_free_space("K:")/(1024*1024*1024)),2).'G'; $disk["K"][1]=round((@disk_total_space("K:")/(1024*1024*1024)),2).'G'; $diskk+=round((@disk_free_space("K:")/(1024*1024*1024)),2); $diskz+=round((@disk_total_space("K:")/(1024*1024*1024)),2); } if(@disk_total_space("L:")!=NULL) { $diskct++; $disk["L"][0]=round((@disk_free_space("L:")/(1024*1024*1024)),2).'G'; $disk["L"][1]=round((@disk_total_space("L:")/(1024*1024*1024)),2).'G'; $diskk+=round((@disk_free_space("L:")/(1024*1024*1024)),2); $diskz+=round((@disk_total_space("L:")/(1024*1024*1024)),2); } ?>
PHP探针_B-Check
body {background-color: #ffffff; color: #000000; font-size:12px; font-family:Arial, Helvetica, sans-serif;}
pre {margin: 0px;}
a {text-decoration: none; color: #000000;}
a:hover {text-decoration: none; background-color:#888888; color:#99FF00;}
table {border-collapse: collapse;margin: auto;}
td,th { border: 1px solid #000000; padding-left:4px; padding-right:4px; padding-top:3px; padding-bottom:1px; height: 22px; vertical-align:middle; text-align:left;}
span { font-weight:normal; padding-right:4px; }
.e {background-color: #ccccff; color: #000000;}
.h {background-color: #9999cc; font-weight: bold; color: #000000; font-size:14px; text-align:left;}
.vr {background-color: #cccccc; text-align: center; color: #000000;}
.vr2 {background-color: #cccccc; color: #000000;}
img {border: 0px;}
hr {width: 600px; background-color: #cccccc; border: 0px; height: 1px; color: #000000;}
.notice {color: #CC3300;}
.center {text-align:center;}
.gbutton {background-color: #ccccff;border-color:#003333;border-width:1px;}
.textborder {border-top-width: 1px;border-right-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-top-color: #9999cc;border-right-color: #9999cc;border-bottom-color: #9999cc;
border-left-color: #9999cc;}
.td1 {BORDER-top: rgb(0,0,0) 1px groove; BORDER-bottom: rgb(0,0,0) 1px groove; BORDER-left: rgb(0,0,0) 1px groove; BORDER-right: rgb(0,0,0) 1px groove}
.td2 {BORDER-top: rgb(0,0,0) 1px groove; BORDER-bottom: rgb(0,0,0) 1px groove; BORDER-right: rgb(0,0,0) 1px groove}
function ShowHide(item1){
var itemtable=document.getElementById(item1);
if(itemtable.style.display=='')
itemtable.style.display='none';
else
itemtable.style.display='';
}
B-Check
| 下载最新版 | 官方 | RoR开发
8 服务器参数
服务器域名/IP:
Web服务端口:
服务器类型/版本:
服务器操作系统:
网站跟目录:
当前文件位置:
系统目录:
获取失败!"; ?>
Path: 获取失败!"; ?>
TEMP: 获取失败!"; ?>
PATHEXT: 获取失败!"; ?>
处理器(CPU)信息:
获取失败!"; ?>
从左至右分别表示Type(类型)、Family(系列)、Mode(型号)、Stepping(步进编号)和Brand ID(品种标识),一般CPU都有Brand ID,如果CPU不是非常老的话。你可以通过Brand ID(品种标识)来判断服务器CPU是什么型号档次的,具体怎么判断你可以去百度或百度知道搜索!在此不细说明!
处理器(CPU)个数:
逻辑处理器个数,IDC客服的话的可信度没有上面这个数字的可信度高。但如果上面的数是16,在以后的几年里你最好别相信那是真的。如果是... 32...(开个玩笑)
服务器时间:
磁盘空间信息:
0) {?>
$value){ ?>
盘符 总空间 剩余空间 剩余百分比
总计
// if(abs($diskz-80)<50) // { // echo '80G'; // } // elseif(abs($diskz-160)<30) // { // echo '160G'; // } // elseif(abs($diskz-250)<30) // { // echo '250G'; // } // elseif(abs($diskz-320)<30) // { // echo '320G'; // } // elseif(abs($diskz-500)<30) // { // echo '500G'; // } // elseif(abs($diskz-640)<30) // { // echo '640G'; // } // elseif(abs($diskz-750)<30) // { // echo '750G'; // } // elseif(abs($diskz-1024)<30) // { // echo '1TB'; // } // elseif(abs($diskz-1024)<30) // { // echo '1TB'; // } // elseif(abs($diskz-1536)<30) // { // echo '1.5TB'; // } // elseif(abs($diskz-2048)<30) // { // echo '2TB'; // } echo $diskz; ?>G
%
声明:只能探测盘符为大写字母A-L的磁盘,且有权限获取!
8 PHP环境基本配置(php.ini)
运行方式:
PHP版本:
Zend版本:
Zend Optimizer版本:
Zend Optimizer仔细检查所有运行 Zend 编译器产生的代码,分析并做优化,让它运行得更快。经过测试确实可以提高程序运行速度超过60%,并且降低了程序对系统资源的耗用。
Mysql客户端库版本:
若成功获取,不要误会是服务器端的Mysql版本了,下面在做Mysql连接测试时会探测服务器的Mysql版本的。
ZEND编译运行:
运行于安全模式:(safe_mode)
访问 URL 对象:(allow_url_fopen)
注册全局变量:(register_globals)
魔术引号开启:(magic_quotes_gpc)
短标记支持:(short_open_tag)
允许使用 PHP 代码开始标志的缩写形式(<? ?>)。很多PHP程序都使用短标记,如著名的Discuz!。如果你的空间不支持这个的话,要当心放DZ论坛哦。
自动转义溢出字符:(magic_quotes_runtime)
允许动态加载链接库:(enable_dl)
显示错误信息:(display_errors)
post最大数据量:(post_max_size)
上传文件的最大大小:(upload_max_filesize)
脚本最大内存使用量:(memory_limit)
查看phpinfo():
PHPINFO
8 PHP组件支持情况
mysql数据库:
图形处理 GD 库:
SQL Server数据库:
PDF文档支持:
Oracle数据库:
FDF文档支持:
Oracle 8 数据库:
Session支持:
mSQL数据库:
Socket支持:
SyBase数据库:
XML解析支持:
Postgre SQL数据库:
FTP支持:
Informix数据库:
ODBC数据库连接:
Hyperwave数据库:
压缩文件支持(Zlib):
FilePro数据库:
Yellow Page系统:
DBM数据库:
SNMP网络管理协议:
DBA数据库:
WDDX支持:
dBase数据库:
拼写检查 ASpell Library:
IMAP电子邮件系统:
历法运算 Calendar:
VMailMgr邮件处理:
LDAP目录协议:
MCrypt加密处理:
PREL相容语法 PCRE:
高精度数学运算 BCMath:
哈稀计算 MHash:
所有已编译模块:
$able=get_loaded_extensions(); foreach ($able as $key=>$value) {
if ($key!=0 && $key%13==0) {
echo ' ';
}
echo "$value ";
}
?>
< tr>
} if("show"==$mysqlReShow){ ?>
$pagendtime=getmicrotime(); $pagetime=round($pagendtime-$pagestartime,5); ?>
Copy code