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

Recommended Answers

All 6 Replies

  1. get server OS name
    http://php.net/manual/en/function.php-uname.php

  2. $_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');
    }

  3. $_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>
Member Avatar for Zagga

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.