PHP to detect web server

Discussion in 'PHP' started by suresh2220, Jun 12, 2008.

  1. #1
    Hi,
    Does any one know the php function to detect the web server(apache/IIS) that the server using.
     
    suresh2220, Jun 12, 2008 IP
  2. php-lover

    php-lover Active Member

    Messages:
    261
    Likes Received:
    21
    Best Answers:
    0
    Trophy Points:
    58
    #2
    echo phpinfo();
    echo php_sapi_name();
     
    php-lover, Jun 12, 2008 IP
  3. sky22

    sky22 Guest

    Messages:
    59
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #3
    You can also use:

    <?php
    
    echo $_SERVER['SERVER_SOFTWARE'];
    
    ?>
    PHP:
     
    sky22, Jun 12, 2008 IP