当前位置: 首页 > 工具软件 > PHPnow > 使用案例 >

php环境检测代码,phpnow php探针环境检测代码

黄无尘
2023-12-01

phpnow php探针环境检测代码

2018-12-30

编程之家收集整理的这篇文章主要介绍了phpnow php探针环境检测代码,编程之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

搜索热词

 
  

/http://PHPnow.org

YinzCN_at_Gmail.com/

error_reporting(E_ALL);

define('TimeZone',+8.0);

function _GET($n) { return isset($_GET[$n]) ? $_GET[$n] : NULL; }

function _SERVER($n) { return isset($_SERVER[$n]) ? $_SERVER[$n] : '[undefine]'; }

if (_GET('act') == 'PHPinfo') {

if (function_exists('PHPinfo')) PHPinfo();

else echo 'PHPinfo() has been disabled.';

exit;

}

$Info = array();

$Info['PHP_ini_file'] = function_exists('PHP_ini_loaded_file') ? PHP_ini_loaded_file() : '[undefine]';

if (_GET('act') == 'getip') {

$i = _SERVER('SERVER_NAME').'|'._SERVER('REMOTE_ADDR').'|'._SERVER('SERVER_SOFTWARE').'|'.(function_exists('MysqL_close')?MysqL_get_client_info():'').'|'._SERVER('DOCUMENT_ROOT');

$c = @file_get_contents('http://PHPnow.org/myip.PHP?'.base64_encode($i));

if (preg_match('/^\d+.\d+.\d+.\d+$/',$c) == 1) echo $c;

else echo 'false';

exit;

}

function colorhost() {

$c = array('#87cefa','#ffa500','#ff6347','#9acd32','#32cd32','#ee82ee');

$a = str_split(_SERVER('SERVER_NAME'));

$k = $l = 0;

foreach ($a as &$d) {

while ($k==$l) $k = array_rand($c);

$d = ''.$d.'';

$l = $k;

}

return implode('',$a);

}

function get_ea_info($name) { $ea_info = eaccelerator_info(); return $ea_info[$name]; }

function get_gd_info($name) { $gd_info = gd_info(); return $gd_info[$name]; }

define('YES','Yes');

define('NO','No');

?>

/p>

"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

PHPnow Works!

获取 IP 地址

=colorhost()?>
# Let's PHP now ! Server InformationSERVER_NAME=_SERVER('SERVER_NAME')?>SERVER_ADDR:PORT=_SERVER('SERVER_ADDR').':'._SERVER('SERVER_PORT')?>SERVER_SOFTWARE=stripos(_SERVER('SERVER_SOFTWARE'),'PHP')?_SERVER('SERVER_SOFTWARE'):_SERVER('SERVER_SOFTWARE').' PHP/'.PHP_VERSION?>PHP_SAPI=PHP_SAPI?>PHP.ini=$Info['php_ini_file']?>网站主目录=_SERVER('DOCUMENT_ROOT')?>Server Date / Time=gmdate('Y-m-d',time()+TimeZone3600)?> =gmdate('H:i:s',time()+TimeZone3600)?> (=(TimeZone<0?'-':'+').gmdate('H:i',abs(TimeZone)*3600)?>)Other Links

| =file_exists('phpMyAdmin') ? '

PHP 组件支持Zend Optimizer=defined('OPTIMIZER_VERSION') ? YES.' / '.OPTIMIZER_VERSION : NO?>MysqL 支持=function_exists('mysql_close') ? YES.' / client lib version '.mysql_get_client_info() : NO?>GD library=function_exists('gd_info') ? YES.' / '.get_gd_info('GD Version') : NO?>eAccelerator=function_exists('eaccelerator_info') ? YES.' / '.get_ea_info('version') : NO?> MysqL 连接测试MysqL 服务器MysqL 数据库名MysqL 用户名MysqL 用户密码 MysqL 测试结果

$link = @MysqL_connect($_POST['MysqLHost'],$_POST['MysqLUser'],$_POST['MysqLPassword']);

$errno = MysqL_errno();

if ($link) $str1 = 'OK ('.MysqL_get_server_info($link).')';

else $str1 = 'Failed

'.MysqL_error();

?>

服务器 =$_POST['mysqlHost']?>=$str1?>数据库 =$_POST['mysqlDb']?>=(@MysqL_select_db($_POST['MysqLDb'],$link))?'OK':'Failed'?>

}?>

 类似资料: