本文整理汇总了PHP中GetHostByName函数的典型用法代码示例。如果您正苦于以下问题:PHP GetHostByName函数的具体用法?PHP GetHostByName怎么用?PHP GetHostByName使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了GetHostByName函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: index
public function index()
{
//服务器的信息
$mysql = mysql_get_server_info();
$this->assign('PHP_V', PHP_VERSION);
//php版本
$this->assign('system', php_uname());
//系统版本
$this->assign('server_ip', GetHostByName($_SERVER['SERVER_NAME']));
//服务器的ip
$this->assign('web_port', $_SERVER['SERVER_PORT']);
//web端口
$this->assign('client_web', $_SERVER['USERDOMAIN']);
//获取用户域名
$this->assign('server_web', $_SERVER["HTTP_HOST"]);
//获取Http请求中Host值(返回值为域名或IP)
$this->assign('mysql', $mysql);
//数据库的版本
$this->assign('timezone', date_default_timezone_get());
//时区
//获取管理员的登录记录
$client = M('admin_log');
$where['user_id'] = $_SESSION['user_id'];
$where['action'] = "登录成功!";
$client_ip = $client->where($where)->order('id desc')->limit(5)->select();
foreach ($client_ip as $k => $v) {
$client_ip[$k]['ip'] = long2ip($v['ip']);
$client_ip[$k]['create_time'] = date("Y-m-d H:i:s", $v['create_time']);
}
//var_dump($client_ip);
$this->assign('client_ip', $client_ip);
//赋值ip
$this->display();
}
示例2: index
public function index()
{
// 日访问量分布
$visitorDay = M('visitor')->select();
$this->visitorDay = $this->getDay($visitorDay);
// 月访问量分布
$visitorMonth = M('visitor')->select();
$this->visitorMonth = $this->getMonth($visitorMonth);
// 服务器信息
$this->system_type_version = php_uname();
$this->run_type = php_sapi_name();
$this->php_version = PHP_VERSION;
$this->php_path = DEFAULT_INCLUDE_PATH;
$this->current_server_ip = GetHostByName($_SERVER['SERVER_NAME']);
$this->current_server_port = $_SERVER['SERVER_PORT'];
$this->domain = $_SERVER["HTTP_HOST"];
$this->server_software = $_SERVER['SERVER_SOFTWARE'];
// 基础信息
$phone = M('webinfo')->where(array('type' => C('电话')))->find();
$beian = M('webinfo')->where(array('type' => C('备案')))->find();
$banquan = M('webinfo')->where(array('type' => C('版权')))->find();
$address = M('webinfo')->where(array('type' => C('地址')))->find();
$this->phone = $phone['content'];
$this->beian = $beian['content'];
$this->banquan = $banquan['content'];
$this->address = $address['content'];
// 显示模板
$this->display();
}
示例3: addLog
function addLog($log_area = '', $log_section = '', $log_user = '', $log_admin = '', $log_details = '')
{
$user_ip = GetHostByName($_SERVER["REMOTE_ADDR"]);
$db = new DBConnection();
$query = 'INSERT INTO logs SET
log_area="' . $log_area . '",log_section="' . $log_section . '",log_user="' . $log_user . '",log_admin="' . $log_admin . '",log_details="' . $log_details . '",
log_date="' . date('Y-m-d H:i:s', CUSTOMTIME) . '", log_ip="' . $user_ip . '"';
$db->rq($query);
}
示例4: main
public function main()
{
//服务器IP
$data['server_ip'] = GetHostByName($_SERVER['SERVER_NAME']);
//最大上传限制
$data['max_upload'] = ini_get("file_uploads") ? ini_get("upload_max_filesize") : "Disabled";
//整理实时数据
$realtime = array('time' => date('Y年n月j日 H:i:s'), 'uptime' => $sys_info['uptime'], 'disk_free' => round(@disk_free_space('.') / (1024 * 1024 * 1024), 2) . ' G', 'mem_used' => round($sys_info['mem_used'] / 1024, 2) . ' G', 'mem_free' => round($sys_info['mem_free'] / 1024, 2) . ' G', 'mem_cached' => round($sys_info['mem_cached'] / 1024, 2) . ' G', 'mem_buffers' => round($sys_info['mem_buffers'] / 1024, 2) . ' G', 'mem_real_used' => round($sys_info['mem_real_used'] / 1024, 2) . ' G', 'mem_real_free' => round($sys_info['mem_real_free'] / 1024, 2) . ' G', 'mem_real_percent' => (int) $sys_info['mem_real_percent'] . '%', 'mem_percent' => (int) $sys_info['mem_percent'] . '%', 'mem_cached_percent' => (int) $sys_info['mem_cached_percent'] . '%', 'swap_percent' => (int) $sys_info['swap_percent'] . '%', 'load_avg' => $sys_info['load_avg']);
$sys_info['disk_total'] = round(@disk_total_space('.') / (1024 * 1024 * 1024), 2);
$this->assign('realtime', $realtime);
$this->assign('sys_info', $sys_info);
$this->assign('data', $data);
$this->display();
}
示例5: welcome
public function welcome()
{
$http = array();
$http['host'] = $_SERVER["HTTP_HOST"];
$http['ip'] = GetHostByName($_SERVER['SERVER_NAME']);
$http['port'] = $_SERVER['SERVER_PORT'];
$http['cip'] = $_SERVER['REMOTE_ADDR'];
$http['system'] = php_uname('s');
$http['php'] = PHP_VERSION;
$http['language'] = $_SERVER['HTTP_ACCEPT_LANGUAGE'];
$http['zend'] = Zend_Version();
date_default_timezone_set('Asia/Shanghai');
$time = date('Y-m-d H:i:s', time());
$http['time'] = $time;
$this->assign('http', $http);
$this->display();
}
示例6: get_position_info
/**
* 判断该position改显示的内容(查询条数若不等于id列表的的条数则表示该position不全相同)
* @param unknown $result
* @param unknown $count
*/
public function get_position_info($result, $count)
{
if (GetHostByName($_SERVER['SERVER_NAME']) == "127.0.0.1") {
$ip = GetHostByName($_SERVER['SERVER_NAME']);
} elseif (GetHostByName($_SERVER['SERVER_NAME']) == "192.168.4.96") {
$ip = GetHostByName($_SERVER['SERVER_NAME']) . ":48093";
} elseif (GetHostByName($_SERVER['SERVER_NAME']) == "192.168.4.97") {
$ip = GetHostByName($_SERVER['SERVER_NAME']) . ":48082";
}
if ($count == 1) {
if ($result[0]['url']) {
$result[0]['url'] = 'http://' . $ip . '/WifiBus/Update/' . $result[0]['url'];
}
if ($result[0]['img']) {
$result[0]['img'] = 'http://' . $ip . '/WifiBus/Update/' . $result[0]['img'];
}
return $result[0];
} else {
if (count($result) != $count) {
return null;
} else {
$flag = false;
for ($i = 1; $i < count($result); $i++) {
if ($result[$i - 1]['url'] != $result[$i]['url']) {
$flag = true;
break;
}
}
if ($flag) {
return null;
} else {
if ($result[0]['url']) {
$result[0]['url'] = 'http://' . $ip . '/WifiBus/Update/' . $result[0]['url'];
}
if ($result[0]['img']) {
$result[0]['img'] = 'http://' . $ip . '/WifiBus/Update/' . $result[0]['img'];
}
return $result[0];
}
}
}
}
示例7: addLog
*/
if (isset($_GET['logout'])) {
addLog('Front-end', 'Login', '' . $_SESSION['user']['user_firstname'] . ' ' . $_SESSION['user']['user_lastname'] . ' (' . $_SESSION['user']['user_account_num'] . ')', 0, 'User successfully logged out');
unset($_SESSION['user']);
if (!$_SESSION['admin']['is_logged']) {
session_destroy();
}
header('Location: index.php');
exit;
}
/**
* Initialize the login
*/
if (isset($_POST['_login']) && $_POST['l_username'] != '' && $_POST['l_password'] != '') {
$db = new DBConnection();
$UserIP = GetHostByName($_SERVER["REMOTE_ADDR"]);
$username = $_POST['l_username'];
$username = $db->string_escape($username);
$password = $_POST['l_password'];
$password = $db->string_escape($password);
$query = 'SELECT * FROM users WHERE user_username="' . $username . '" AND user_status=1 AND user_password!="" LIMIT 1';
$res = $db->rq($query);
$row = $db->fetch($res);
$base_password = $row['user_password'];
$validatePassword = FALSE;
if ($password == $base_password) {
$validatePassword = TRUE;
}
if ($validatePassword == TRUE && strtolower($row['user_username']) == strtolower($username)) {
// if everything goes ok
page_header_simple(1);
示例8: WhoIs_Check
//.........这里部分代码省略.........
#-------------------------------------------------------------------------------
} elseif (Preg_Match('/^[0-9]{4}\\-[0-9]{2}\\-[0-9]{2}$/', $ExpirationDate)) {
#-------------------------------------------------------------------------------
$Date = Array_Combine(array('Year', 'Month', 'Day'), Explode('-', $ExpirationDate));
#-------------------------------------------------------------------------------
$ExpirationDate = MkTime(0, 0, 0, $Date['Month'], $Date['Day'], $Date['Year']);
#-------------------------------------------------------------------------------
} elseif (Preg_Match('/^[0-9]{2}\\-[a-zA-Z]{3}\\-[0-9]{4}$/', $ExpirationDate)) {
#-------------------------------------------------------------------------------
$Date = Array_Combine(array('Day', 'Month', 'Year'), Explode('-', $ExpirationDate));
#-------------------------------------------------------------------------------
$Month = Array_Search(StrToLower($Date['Month']), $Months);
#-------------------------------------------------------------------------------
$ExpirationDate = MkTime(0, 0, 0, $Month + 1, $Date['Day'], $Date['Year']);
#-------------------------------------------------------------------------------
} elseif (Preg_Match('/^[0-9]{2}\\s[a-zA-Z]{2,10}\\s[0-9]{4}$/', $ExpirationDate)) {
#-------------------------------------------------------------------------------
$Months = array('january', 'february', 'march', 'april', 'may', 'june', 'july', 'august', 'september', 'octember', 'november', 'decemeber');
#-------------------------------------------------------------------------------
$Date = Array_Combine(array('Day', 'Month', 'Year'), Preg_Split('/\\s+/', $ExpirationDate));
#-------------------------------------------------------------------------------
$Month = Array_Search(StrToLower($Date['Month']), $Months);
#-------------------------------------------------------------------------------
$ExpirationDate = MkTime(0, 0, 0, $Month + 1, $Date['Day'], $Date['Year']);
#-------------------------------------------------------------------------------
} else {
#-------------------------------------------------------------------------------
$Date = Array_Combine(array('Week', 'Month', 'Day', 'Time', 'GMT', 'Year'), Preg_Split('/\\s+/', $ExpirationDate));
#-------------------------------------------------------------------------------
$Month = Array_Search(StrToLower($Date['Month']), $Months);
#-------------------------------------------------------------------------------
$ExpirationDate = MkTime(0, 0, 0, $Month + 1, $Date['Day'], $Date['Year']);
#-------------------------------------------------------------------------------
}
#-------------------------------------------------------------------------------
$Result['ExpirationDate'] = $ExpirationDate;
#-------------------------------------------------------------------------------
}
#-------------------------------------------------------------------------------
}
#-------------------------------------------------------------------------------
$NsName = $DomainZone['NsName'];
#-------------------------------------------------------------------------------
if ($NsName) {
#-------------------------------------------------------------------------------
if (Preg_Match_All(SPrintF('/%s/', $NsName), $Answer, $Mathes)) {
#-------------------------------------------------------------------------------
if (Count($Mathes) < 2) {
return ERROR | @Trigger_Error('[WhoIs_Check]: шаблон поиска именных серверов задан неверно');
}
#-------------------------------------------------------------------------------
$NsNames = $Mathes[1];
#-------------------------------------------------------------------------------
for ($i = 0; $i < Count($NsNames); $i++) {
#-------------------------------------------------------------------------------
$NsName = Trim(StrToLower($NsNames[$i]), '.');
#-------------------------------------------------------------------------------
$Result[SPrintF('Ns%uName', $i + 1)] = $NsName;
#-------------------------------------------------------------------------------
if ($NsName) {
#-------------------------------------------------------------------------------
if (Mb_SubStr($NsName, -Mb_StrLen($Domain)) == $Domain) {
#-------------------------------------------------------------------------------
$IP = GetHostByName($NsName);
#-------------------------------------------------------------------------------
if ($IP != $NsName) {
$Result[SPrintF('Ns%uIP', $i + 1)] = $IP;
}
#-------------------------------------------------------------------------------
}
#-------------------------------------------------------------------------------
}
#-------------------------------------------------------------------------------
}
#-------------------------------------------------------------------------------
}
#-------------------------------------------------------------------------------
}
#-------------------------------------------------------------------------------
$Registrar = $DomainZone['Registrar'];
#-------------------------------------------------------------------------------
if ($Registrar) {
#-------------------------------------------------------------------------------
if (Preg_Match(SPrintF('/%s/', $Registrar), $Answer, $Mathes)) {
#-------------------------------------------------------------------------------
if (Count($Mathes) < 2) {
return ERROR | @Trigger_Error('[WhoIs_Check]: шаблон поиска регистратора серверов задан неверно');
}
#-------------------------------------------------------------------------------
$Registrar = Next($Mathes);
#-------------------------------------------------------------------------------
$Result['Registrar'] = $Registrar;
#-------------------------------------------------------------------------------
}
#-------------------------------------------------------------------------------
}
#-------------------------------------------------------------------------------
return $Result;
#-------------------------------------------------------------------------------
}
示例9: getRemoteHost
/**
* @brief Return the remote hostname
* @see request::getRemoteIp
* @return string The remote hostname
*/
static function getRemoteHost()
{
$host = GetHostByName(self::getRemoteIp());
if ($host) {
return $host;
}
return self::getRemoteIp();
}
示例10: get_server_ip
function get_server_ip()
{
if (isset($_ENV["HOSTNAME"])) {
$MachineName = $_ENV["HOSTNAME"];
} else {
if (isset($_ENV["COMPUTERNAME"])) {
$MachineName = $_ENV["COMPUTERNAME"];
} else {
$MachineName = $_SERVER["SERVER_NAME"];
}
}
return GetHostByName($MachineName);
//该函数特别慢 1到5秒 和网络有关
}
示例11: page_header_simple
function page_header_simple($redirect = 0)
{
if ($_SESSION['user']['is_logged'] == 1) {
$PageTitle = getLang('ptitle_logged');
} else {
$PageTitle = getLang('ptitle_notlogged');
}
echo '<!DOCTYPE html>
<!--[if lt IE 7]> <html lang="en-us" class="no-js ie6"> <![endif]-->
<!--[if IE 7]> <html lang="en-us" class="no-js ie7"> <![endif]-->
<!--[if IE 8]> <html lang="en-us" class="no-js ie8"> <![endif]-->
<!--[if IE 9]> <html lang="en-us" class="no-js ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html lang="en-us" class="no-js"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<title>' . $PageTitle . '</title>
<meta http-equiv="content-type" content="application/xhtml+xml" />
<meta http-equiv="X-UA-Compatible" content="IE=100" />
<meta name="robots" content="NOINDEX,NOFOLLOW" />
<meta name="viewport" content="width=device-width; initial-scale=1; maximum-scale=1;">
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
';
echo '
<link href="adminica/styles/adminica/reset.css" media="all" rel="stylesheet" type="text/css" />
<link href="adminica/styles/plugins/all/plugins.css" media="all" rel="stylesheet" type="text/css" />
<link href="adminica/styles/adminica/all.css" media="all" rel="stylesheet" type="text/css" />
<link rel="stylesheet" href="adminica/styles/themes/layout_switcher.php?default=layout_fixed.css" >
<link rel="stylesheet" href="adminica/styles/themes/nav_switcher.php?default=nav_top.css" >
<link rel="stylesheet" href="adminica/styles/themes/skin_switcher.php?default=skin_light.css" >
<link rel="stylesheet" href="adminica/styles/themes/theme_switcher.php?default=theme_blue.css" >
<link rel="stylesheet" href="adminica/styles/themes/bg_switcher.php?default=bg_white_wall.css" >
<link rel="stylesheet" href="adminica/styles/adminica/colours.css">
<link rel="stylesheet" href="css/custom.css">
<link rel="stylesheet" href="css/font-awesome/css/font-awesome.min.css">
<link href="css/validationEngine.jquery.css" media="all" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="adminica/scripts/plugins-min.js"></script>
<script type="text/javascript" src="adminica/scripts/adminica/adminica_all-min.js"></script>
<!--<script type="text/javascript" src="js/jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="js/jquery-ui-1.7.2.custom.min.js"></script>-->
<script type="text/javascript" src="js/scripts.js"></script>';
if ($SelectedTab == 2) {
echo '
<link href="css/jquery.jqplot.css" media="all" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="js/excanvas.min.js"></script>
<script type="text/javascript" src="js/jquery.jqplot.min.js"></script>
<script type="text/javascript" src="js/plugins/jqplot.dateAxisRenderer.min.js"></script>
<script type="text/javascript" src="js/plugins/jqplot.canvasTextRenderer.min.js"></script>
<script type="text/javascript" src="js/plugins/jqplot.canvasAxisTickRenderer.min.js"></script>
<script type="text/javascript" src="js/plugins/jqplot.categoryAxisRenderer.min.js"></script>
<script type="text/javascript" src="js/plugins/jqplot.barRenderer.js"></script>
';
}
echo '
<style>
.xLabel
{
display: inline-block;
width: 50%;
}
</style>
</head>
<body>
<div id="pjax">';
include 'includes/custom_header.php';
if ($_SESSION['user']['is_logged'] == 1) {
echo '<div id="main_container" class="main_container container_16 clearfix">';
include 'adminica/includes/components/navigation.php';
} else {
$db = new DBConnection();
$UserIP = GetHostByName($_SERVER["REMOTE_ADDR"]);
$query = 'SELECT banned_ips_id FROM banned_ips WHERE banned_ip="' . $UserIP . '" LIMIT 1';
$res = $db->rq($query);
$num_rows = $db->num_rows($res);
$db->close();
if ($num_rows > 0) {
echo '</div><div class="LoginContainer"><h3>' . getLang('lform_publicbanmessage') . '</h3></div>';
} else {
//include('parts/login_box.php');
}
}
}
示例12: index
function index()
{
$this->auth_middleware();
$time = date('Y-m-d H:i:s');
$os = php_uname('s');
$php_version = 'php ' . php_uname('r');
$service = $_SERVER["SERVER_SOFTWARE"];
$service_ip = GetHostByName($_SERVER['SERVER_NAME']);
$host = $_SERVER["HTTP_HOST"];
$this->assign('os', $os);
$this->assign('running', $php_version);
$this->assign('service', $service);
$this->assign('service_ip', $service_ip);
$this->assign('host', $host);
$this->assign('time', $time);
$this->display();
}
示例13: getServerip
public function getServerip()
{
return GetHostByName($_SERVER['SERVER_NAME']);
}
示例14: GetHostByName
<TABLE WIDTH="796" BORDER="0" CELLSPACING="0" CELLPADDING="0" HEIGHT="63">
<TR>
<TD HEIGHT="50"><img src="../images/main.gif" width="796" height="50"></TD>
</TR>
<TR>
<TD HEIGHT="13">
<table width="796" border="0" cellspacing="0" cellpadding="0" background="../images/pg_bgk.gif">
<tr>
<td width="160" height="979" valign="TOP">
<div align="left"><br>
</div>
</td>
<td class="sides" valign="TOP" align="left" width="476"> <br>
<table width="468" border="0" cellspacing="0" cellpadding="0">
<tr>
<td background="../images/ad_top.gif" height="20">
<div align="center"><font face="Tahoma" size="1" color="#FFFFFF"><i><b>Please
Support us, Click the AD!</b></i></font></div>
</td>
</tr>
<tr>
<td><div align="center"><script language="javascript" src="http://www.qksz.net/1e-3j5e"></script></div></td>
</tr>
<tr>
<td height="20" background="../images/ad_bottem.gif"><div align="center"><font face="Tahoma" size="1" color="#FFFFFF"><i><b><?php
$domain = GetHostByName($REMOTE_ADDR);
echo "{$domain} @ Twisted Dreams";
?>
</b></i></font></div></td>
</tr>
</table>
示例15: pnMailHackAttempt
function pnMailHackAttempt($detecting_file = "(no filename available)", $detecting_line = "(no line number available)", $hack_type = "(no type given)", $message = "(no message given)")
{
# Backwards compatibility fix with php 4.0.x and 4.1.x or greater Neo
if (phpversion() >= "4.2.0") {
$_pv = $_POST;
$_gv = $_GET;
$_rv = $_REQUEST;
$_sv = $_SERVER;
$_ev = $_ENV;
$_cv = $_COOKIE;
$_fv = $_FILES;
$_snv = $_SESSION;
} else {
global $HTTP_POST_VARS, $HTTP_GET_VARS, $HTTP_SERVER_VARS, $HTTP_ENV_VARS, $HTTP_COOKIE_VARS, $HTTP_POST_FILES, $HTTP_SESSION_VARS;
$_pv = $HTTP_POST_VARS;
$_gv = $HTTP_GET_VARS;
$_rv = array();
$_sv = $HTTP_SERVER_VARS;
$_ev = $HTTP_ENV_VARS;
$_cv = $HTTP_COOKIE_VARS;
$_fv = $HTTP_POST_FILES;
$_snv = $HTTP_SESSION_VARS;
}
$output = "Attention site admin of " . pnConfigGetVar('sitename') . ",\n";
$output .= "On " . ml_ftime(_DATEBRIEF, GetUserTime(time()));
$output .= " at " . ml_ftime(_TIMEBRIEF, GetUserTime(time()));
$output .= " the Postnuke code has detected that somebody tried to" . " send information to your site that may have been intended" . " as a hack. Do not panic, it may be harmless: maybe this" . " detection was triggered by something you did! Anyway, it" . " was detected and blocked. \n";
$output .= "The suspicious activity was recognized in {$detecting_file} " . "on line {$detecting_line}, and is of the type {$hack_type}. \n";
$output .= "Additional information given by the code which detected this: " . $message;
$output .= "\n\nBelow you will find a lot of information obtained about " . "this attempt, that may help you to find what happened and " . "maybe who did it.\n\n";
$output .= "\n=====================================\n";
$output .= "Information about this user:\n";
$output .= "=====================================\n";
if (!pnUserLoggedIn()) {
$output .= "This person is not logged in.\n";
} else {
$output .= "Postnuke username: " . pnUserGetVar('uname') . "\n" . "Registered email of this Postnuke user: " . pnUserGetVar('email') . "\n" . "Registered real name of this Postnuke user: " . pnUserGetVar('name') . "\n";
}
$output .= "IP numbers: [note: when you are dealing with a real cracker " . "these IP numbers might not be from the actual computer he is " . "working on]" . "\n\t IP according to HTTP_CLIENT_IP: " . getenv('HTTP_CLIENT_IP') . "\n\t IP according to REMOTE_ADDR: " . getenv('REMOTE_ADDR') . "\n\t IP according to GetHostByName(\$REMOTE_ADDR): " . GetHostByName($REMOTE_ADDR) . "\n\n";
$output .= "\n=====================================\n";
$output .= "Information in the \$_REQUEST array\n";
$output .= "=====================================\n";
while (list($key, $value) = each($_rv)) {
$output .= "REQUEST * {$key} : {$value}\n";
}
$output .= "\n=====================================\n";
$output .= "Information in the \$_GET array\n";
$output .= "This is about variables that may have been ";
$output .= "in the URL string or in a 'GET' type form.\n";
$output .= "=====================================\n";
while (list($key, $value) = each($_gv)) {
$output .= "GET * {$key} : {$value}\n";
}
$output .= "\n=====================================\n";
$output .= "Information in the \$_POST array\n";
$output .= "This is about visible and invisible form elements.\n";
$output .= "=====================================\n";
while (list($key, $value) = each($_pv)) {
$output .= "POST * {$key} : {$value}\n";
}
$output .= "\n=====================================\n";
$output .= "Browser information\n";
$output .= "=====================================\n";
global $HTTP_USER_AGENT;
$output .= "HTTP_USER_AGENT: " . $HTTP_USER_AGENT . "\n";
$browser = (array) get_browser();
while (list($key, $value) = each($browser)) {
$output .= "BROWSER * {$key} : {$value}\n";
}
$output .= "\n=====================================\n";
$output .= "Information in the \$_SERVER array\n";
$output .= "=====================================\n";
while (list($key, $value) = each($_sv)) {
$output .= "SERVER * {$key} : {$value}\n";
}
$output .= "\n=====================================\n";
$output .= "Information in the \$_ENV array\n";
$output .= "=====================================\n";
while (list($key, $value) = each($_ev)) {
$output .= "ENV * {$key} : {$value}\n";
}
$output .= "\n=====================================\n";
$output .= "Information in the \$_COOKIE array\n";
$output .= "=====================================\n";
while (list($key, $value) = each($_cv)) {
$output .= "COOKIE * {$key} : {$value}\n";
}
$output .= "\n=====================================\n";
$output .= "Information in the \$_FILES array\n";
$output .= "=====================================\n";
while (list($key, $value) = each($_fv)) {
$output .= "FILES * {$key} : {$value}\n";
}
$output .= "\n=====================================\n";
$output .= "Information in the \$_SESSION array\n";
$output .= "This is session info. The variables\n";
$output .= " starting with PNSV are PostNukeSessionVariables.\n";
$output .= "=====================================\n";
while (list($key, $value) = each($_snv)) {
$output .= "SESSION * {$key} : {$value}\n";
//.........这里部分代码省略.........