Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • How to use get_browser() Function in php ?

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 112
    Comment on it

    Hi Reader's,
    Welcome to FindNerd, today we are going to discuss how to use get_browser() Function in php ?

    The get_browser() function returns the capabilities of the user's browser.
    It looks up the user's browscap.ini file.

    syntax of get_browser()

    get_browser(user_agent,return_array)
    

    The above syntax user_agent,return_array both parameter are optional.

    you can see bellow example:

    <?php
    //here call user_agent
     echo $_SERVER['HTTP_USER_AGENT'];
    $get_browser = get_browser();
    //print the $get_browser
    print_r($get_browser);
    
    ?>
    

    The above example will output something:

    Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:35.0) Gecko/20100101 Firefox/35.0

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: