In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article mainly introduces how to use get_browser in php, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let the editor take you to understand it.
The php get_browser function can measure the performance of the user's browser by consulting the user's browscap.ini file, and its syntax is "get_browser (user_agent,return_array)".
This article operating environment: Windows7 system, PHP7.1 version, Dell G3 computer
Php get_browser usage
The get_browser () function returns the performance of the user's browser.
This function measures the performance of the user's browser by consulting the user's browscap.ini file.
If successful, the function returns an object or an array containing the user's browser information, or false if it fails.
Grammar
Get_browser (user_agent,return_array)
Parameters.
User_agent
Optional. Specifies the name of the HTTP user agent. The default is the value of $HTTP_USER_AGENT.
You can bypass this parameter by setting NULL.
Return_array is optional. If this parameter is set to true, this function returns an array instead of an object.
Tips and comments
Note: the return statement immediately terminates the evaluation of the string.
Note: this function is useful for code storage in the database text field for later calculation.
Examples
Output:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322) Array ([browser_name_regex] = > ^ mozilla/.\ .0. *;. * windows nt 5\ .1. *\ .net clr.*). * $[browser_name_pattern] = > Mozilla/?.0 (compatible; MSIE 6.0 *) * Windows NT 5.1*.NET CLR*) * [parent] = > IE 6.0 [platform] = > WinXP [netclr] = > 1 [browser] = > IE [version] = > 6.0 [majorver] = > 6 [minorver] = > 0 [css] = > 2 [frames] = > 1 [iframes] = > 1 [tables] = > 1 [cookies] = > 1 [backgroundsounds] = > 1 [vbscript] = > 1 [javascript] = > 1 [javaapplets] = > 1 [activexcontrols] = > 1 [cdf] = > 1 [aol] = > [beta] = > [win16] = > [crawler] = > [stripper] = > [wap] = > [ak] = > [sk] = >) Thank you for reading this article carefully I hope the article "how to use get_browser in php" shared by the editor will be helpful to everyone. At the same time, I also hope that you will support and pay attention to the industry information channel. More related knowledge is waiting for you to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.