php gets browser kernel version
php gets the browser kernel version
<?php function getBrowser(){ $agent=$_SERVER["HTTP_USER_AGENT"]; if(strpos($agent,'MSIE')!==false || strpos($agent,'rv:11.0')) //ie11判断 return "ie"; else if(strpos($agent,'Firefox')!==false)//火狐 return "firefox"; else if(strpos($agent,'Chrome')!==false)//谷歌 return "chrome"; else if(strpos($agent,'Opera')!==false)//opera return 'opera'; else if((strpos($agent,'Chrome')==false)&&strpos($agent,'Safari')!==false) return 'safari'; } function getBrowserVer(){ if (empty($_SERVER['HTTP_USER_AGENT'])){ //当浏览器没有发送访问者的信息的时候 return 'unknow'; } $agent= $_SERVER['HTTP_USER_AGENT']; if (preg_match('/MSIE\s(\d+)\..*/i', $agent, $regs))//IE浏览器版本号 return $regs[1]; elseif (preg_match('/FireFox\/(\d+)\..*/i', $agent, $regs))//火狐浏览器版本号return $regs[1]; elseif (preg_match('/Opera[\s|\/](\d+)\..*/i', $agent, $regs))//opera浏览器版本号 return $regs[1]; elseif (preg_match('/Chrome\/(\d+)\..*/i', $agent, $regs))//谷歌浏览器版本号 return $regs[1]; elseif ((strpos($agent,'Chrome')==false)&&preg_match('/Safari\/(\d+)\..*$/i', $agent, $regs)) return $regs[1]; else return 'unknow'; } $a=(getBrowser()); $b=(getBrowserVer()); echo $a;//然后对变量进行判断等操作 echo $b; ?>
The above introduces php to get the browser kernel version, including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.
Related articles:

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics











Binance Square is a social media platform provided by Binance Exchange, aiming to provide users with a space to communicate and share information related to cryptocurrencies. This article will explore the functions, reliability and user experience of Binance Plaza in detail to help you better understand this platform.

In the field of cryptocurrency trading, the security of exchanges has always been the focus of users. In 2025, after years of development and evolution, some exchanges stand out with their outstanding security measures and user experience. This article will introduce the five most secure exchanges in 2025 and provide practical guides on how to avoid Black U (hacker attacks users) to ensure your funds are 100% secure.

As the world's leading cryptocurrency exchange, Binance is always committed to providing users with a safe and convenient trading experience. Over time, Binance has continuously optimized its platform features and user interface to meet the changing needs of users. In 2025, Binance launched a new login portal aimed at further improving the user experience.

In the cryptocurrency market, choosing a reliable trading platform is crucial. As a world-renowned digital asset exchange, the OK trading platform has attracted a large number of novice users in mainland China. This guide will introduce in detail how to register and use it on the OK trading platform to help novice users get started quickly.

As the world's leading cryptocurrency exchange, Binance is always committed to providing users with a safe and convenient trading experience. Over time, Binance has continuously optimized its platform features and user interface to meet the changing needs of users. In 2025, Binance launched a new login portal aimed at further improving the user experience.

The reason for using Dependency Injection (DI) is that it promotes loose coupling, testability, and maintainability of the code. 1) Use constructor to inject dependencies, 2) Avoid using service locators, 3) Use dependency injection containers to manage dependencies, 4) Improve testability through injecting dependencies, 5) Avoid over-injection dependencies, 6) Consider the impact of DI on performance.

As the world's leading cryptocurrency exchange, Binance is always committed to providing users with a safe and convenient trading experience. Over time, Binance has continuously optimized its platform features and user interface to meet the changing needs of users. In 2025, Binance launched a new login portal aimed at further improving the user experience.

Binance is one of the world's leading cryptocurrency trading platforms, providing trading services for a variety of digital assets. If you are considering using Binance for cryptocurrency trading, this article will provide you with a detailed installation and registration guide.
