-
-
header("content-type: text/html; charset=utf-8"); - header("cache-control: no-cache, must-revalidate");
- header("pragma: no-cache");
- error_reporting(0);
- ob_end_flush();
?>
- //加了这句,看看能不能解决linux下显示乱码的问题?
- php 探针 v1.0 - bbs.it-home.org
-
版权信息
- [基本信息] [高级信息]
- if (function_exists("phpinfo")){
- echo'[phpinfo]';}
echo' php探针v1.0 by mkduse(blueidea-id)
此程序代码,可免费使用;但不得用于商业用途;完全转载或使用此代码,请保留版权信息; 欢迎指正错误提建议,qq:122712355 ';
if (empty($_get['typ'])){
- baseinfo();}
- else{
- switch ($_get['typ']){
- case 'phpinfo':
- phpinfoview();
- break;
- case 'superinfo':
- superinfo();
- break;
- case 'baseinfo':
- baseinfo();
- break;
- default:
- baseinfo();}
- }
function getime()
- {
- $t = gettimeofday();
- return (float)($t['sec'] + $t['usec']/1000000);
- }
function baseinfo(){
- echo '
Basic information';
- $arr[]=array("current php version:",phpversion( ));
- $arr[]=array("zend engine version:",zend_version());
- $arr[]=array("server version",$_server['server_software']);
- $arr[] =array("ip address",$_server['remote_host']);//ip
- $arr[]=array("domain name",$_server['http_host']);
- $arr[]=array(" Protocol port",$_server['server_protocol'].' '.$_server['server_port']);
- $arr[]=array("site root directory",$_server['path_translated']) ;
- $arr[]=array("Server time",date('y year m month d day,h:i:s,d'));
- $arr[]=array("current user",get_current_user( ));
- $arr[]=array("operating system",php_uname('s').php_uname('r').php_uname('v'));
- $arr[]=array("include_path", ini_get('include_path'));
- $arr[]=array("server api",php_sapi_name());
$arr[]=array("error_reporting level",ini_get( "display_errors"));
- $arr[]=array("post submission limit",ini_get('post_max_size'));
- $arr[]=array("upload_max_filesize",ini_get('upload_max_filesize'));
- $ arr[]=array("Script timeout",ini_get('max_execution_time').'seconds');
if (ini_get("safe_mode")==0){
- $arr []=array("php safe mode (safe_mode)",'off');}
- else{
- $arr[]=array("php safe mode (safe_mode)",'on');}
if (function_exists('memory_get_usage')){
- $arr[]=array("memory_get_usage",ini_get('memory_get_usage'));}
//$ arr[]=array("Available space",intval(diskfreespace('/')/(1024 * 1024))."m");
- echo'
';
- for($i=0;$ i{
- $overview='
'.$arr[$i][0].' | '.$arr[$i][1].' | ';
- echo $overview;
- }
- echo'
';
- echo '< ;h2>Server performance test';
- echo'
Server | Integer operation 500,000 additions (1+1) | Floating point operations 500,000 square roots (3.14 square roots) | ';
- echo'
mkduse machine (p4 1.5g 256ddr winxp sp2)465.08ms | 466.66ms | ';
- $ time_start=getime();
- for($i=0;$i<=500000;$i++);
- {$count=1+1;}
- $timea=round((getime()-$time_start)*1000 ,2);
- echo '
Current server | '.$timea.'ms | ';
$time_start=getime();
- for($i=0;$i<=500000;$i++);
- {sqrt(3.14);}
- $timea=round((getime()-$ time_start)*1000,2);
- echo '
'.$timea.'ms | ';
- ? >
- function gettime()
- {
- var time;
- time=new date();
- return time.gettime();
- }
- start_time=gettime();
- echo '
Bandwidth Test';
- for ($i=0;$i<100;$i++){
- print "";}
?>
- var timea ;
- var netspeed;
- timea=gettime()-start_time;
- netspeed=math.round(10/timea*1000);
- document.getelementbyidx("dk").innerhtml="Sending 10kb data to the client, time consuming "+timea+"ms
Your connection speed to this server is "+netspeed+"kb/s";
echo' Loaded extension library (enable)';
- $arr =get_loaded_extensions();
- foreach($arr as $value){
- echo $value.'
';}
echo' Disabled functions';
- $disfun=ini_get('disable_functions' );
- if (empty($disfun)){
- echo 'not disabled';}
- else{
- echo ini_get('disable_functions').'';}
}//Close
function superinfo(){
- echo'
Advanced informationphp_ini_user 1 configuration options available in user php script or windows registry php_ini_perdir 2 Configuration options can be set in php.ini, .htaccess or httpd.conf php_ini_system 4 Configuration options can be set in php.ini or httpd.conf< ;br>php_ini_all 7 Configuration options can be set everywhere ';
$arr1=ini_get_all();
- for ($i=0;$i
- {
- $arr2=array_slice($arr1,$i,1);
- print_r($arr2);
- echo '
';
- }
- }
function phpinfoview(){
- phpinfo();
- }
- ?>
-
Copy code
php server probe displays php server information
PHP probe to obtain client information
php probe code with view password
Analysis of the reasons why the php probe does not display cpu, memory, and hard disk information
|