How to find the following information using php?
Server Information
Server OS Linux
PHP Version 5.4.8
Server Handler fpm-fcgi
Platform windows
Admin Information
IP Address 202.93.141.94
Browser Mozilla Firefox
Version 20.0
How to find the following information using php?
Server Information
Server OS Linux
PHP Version 5.4.8
Server Handler fpm-fcgi
Platform windows
Admin Information
IP Address 202.93.141.94
Browser Mozilla Firefox
Version 20.0
In addition, for the Server Handler use php_sapi_name()
: http://php.net/manual/en/function.php-sapi-name.php
get server OS name
http://php.net/manual/en/function.php-uname.php
$_SERVER Indices to get ip of user http://www.php.net/manual/en/reserved.variables.server.php
function _ip( )
{
if (preg_match( "/^([d]{1,3}).([d]{1,3}).([d]{1,3}).([d]{1,3})$/", getenv('HTTP_X_FORWARDED_FOR'))
{
return getenv('HTTP_X_FORWARDED_FOR');
}
return getenv('REMOTE_ADDR');
}
$_SERVER Indices to get server software running SERVER_SOFTWARE http://www.php.net/manual/en/reserved.variables.server.php
output :-Apache/2.2.22 (Win64) PHP/5.3.13
I replace it with this why I still get empty result?
<td>Server OS</td><td><?php $_SERVER['SERVER_NAME']; ?></td>
Try:
<td>Server OS</td><td><?php echo $_SERVER['SERVER_NAME']; ?></td>
Thanks. How to find the rest of the information:
PHP Version 5.4.8
Server Handler fpm-fcgi
Platform windows
Admin Information
IP Address 202.93.141.94
Browser Mozilla Firefox
Version 20.0
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.