Get the browser version in PHP directly using http_user_agent can be, but to determine the specific browser, what version we need to judge each,
Example 1
The code is as follows
Copy Code
function Get_user_browser () {if
Cosine (@evilcos)0x01. XSS multiple ways to get plaintext passwordsI have felt the great innovation of the web trend, especially the recent HTML5 is getting more and more fire. Browsers in the client partition the Web OS, as long as the user
Php obtains the browser name if (strpos ($ _ SERVER [HTTP_USER_AGENT], 'maxthon ')){??? $ Browser = 'maxthon ';} elseif (strpos ($ _ SERVER [HTTP_USER_A php get the browser name
If (strpos ($ _ SERVER [HTTP_USER_AGENT], 'maxthon ')){??? $ Browser =
Php obtains the browser name version instance program. You can directly use HTTP_USER_AGENT to obtain the browser version in php. However, you need to determine the version of the browser, example 1 the code below is used to obtain the browser
The role of the object, so all variables/functions declared in the global scope become properties and methods of the Window object;/PS: Attempting to access an undeclared variable throws an error, but by querying the Window object, you can know if
Today, the boss gave me a need to ask me to investigate, he has tested the iOS platform is available, the requirement is simple is to enter a URI in the system browser to open the corresponding app.For example, you enter in the system browser of iOS:
Copy code code as follows:
Get Browser name and version information
function AppInfo () {
var browser = {
Msie:false, Firefox:false, Opera:false, Safari:false,
Chrome:false, Netscape:false, appname: ' Unknown ', version:0
},
The httpservlet class defines a getlastmodified method. Its complete syntax is defined as follows:
Protected long getlastmodified (httpservletrequest req)
The returned value indicates the number of milliseconds that have been calculated since 00:00:0
Obtain the browser name and version information. If the current browser is IE, the browser version is displayed. Otherwise, the current browser name and version are displayed. For detailed implementation code, see this article.
The Code is as
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.