Pink panther

Well-known member
  • Nov 8, 2011
    23,234
    3,133
    113
    35
    ~ ση тнє ƒℓσω ~
    fsvT.jpeg
     

    ||~R_girl~||

    Member
    Mar 21, 2008
    34,536
    460
    0
    what do u wnna knw? may be i can help ya

    okay this is the question:

    Write a PHP script to detect the type of browser used to display the script. The
    information about the browser being used can be found in the value of a special
    reserved PHP variable (more accurately an array element)
    $_SERVER['HTTP_USER_AGENT'] . You need to use a built-in PHP string
    function to check for three keywords in $_SERVER['HTTP_USER_AGENT']:
    „MSIE‟, „Firefox‟ and „Chrome‟. If „MSIE‟ is found, output “you are using Microsoft
    Internet Explorer”; If „Firefox‟ is found, output “you are using Mozilla Firefox”; If
    „Chrome‟ is found, output “you are using Google Chrome”; If none of the three is
    found, output “you are using a browser other than Microsoft Internet Explorer,
    Mozilla Firefox and Google Chrome”. See
    http://www.useragentstring.com/pages/useragentstring.php for a list of User Agent
    Strings for different browsers.

    should this be done in if and else statement? i mean i just dont get the whole thing how to do it...
     

    ||~R_girl~||

    Member
    Mar 21, 2008
    34,536
    460
    0
    Debug the following PHP document:
    <?xml version = "1.0" encoding = "utf-8"?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 //EN"
    "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
    <html xmlns = "http://www.w3.org/1999/xhtml">
    <head> <title> debug.php </title>
    </head>
    <body>
    <?php
    $count =1;
    While {$count <=100){
    if ($count % 2)
    print "<p> **** </p>"
    else
    print "<p> ++++++++</p>";
    count ++;
    }
    ?>
    </body>
    </html>