1. Use $_SERVER['HTTP_USER_AGENT'] to write a PHP method to determine the browser type. function my_get_browser(){ if(empty($_SERVER['HTTP_USER_AGENT'])){ return 'Command line, the robot is here! '; } if(false!==strpos($_SERVER['HTTP_USER_AGENT'],'MSIE 9.0')){ return 'Internet Explorer 9.0'; } if(false!==strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE 8.0')){ return 'Internet Explorer 8.0'
1. 10 recommended articles about the php get_browser function
Introduction: 1. Use $_SERVER['HTTP_USER_AGENT'] to write a PHP method to determine the browser type. function my_get_browser(){ if(empty($_SERVER['HTTP_USER_AGENT'])){ return 'Command line, the robot is here! '; } if(false!==strpos($_SERVER['HT...
2. php determines the type of client browser
Introduction: PHP determines the type of client browser 1. Through $_SERVER['HTTP_USER_AGENT'] Let’s write a PHP method to determine the browser type. function my_get_browser(){ if(empty($_SERVER['HTTP_USER_AGENT'])){ return 'Command line, the robot is coming! '; } if(false!==strpos( $_SERVER['H ...
3. PHP determines browser type
Introduction: 1. Below Let's write a PHP method to determine the browser type through $_SERVER['HTTP_USER_AGENT'] function my_get_browser(){ if(empty($_SERVER['HTTP_USER_AGENT'])){ return 'Command line, the robot is here! '; } if(false!==strpos($_SERVER['HTTP_USER_AGENT'],'MSIE
4. PHP Cookbook Reading Notes – Chapter 08 Web Basics
Introduction: This chapter mainly introduces some basic knowledge related to the web, such as cookies, get requests, post requests, reading and writing of environment variables, etc. setcookie(): Set cookie values. $_COOKIE['name']: Get cookie value Browser redirection: header('Location: http://www.example.com/confirm.html'); get_browser(): Get
The above is the detailed content of Recommended 4 articles about get_browser. For more information, please follow other related articles on the PHP Chinese website!