PHP determines whether to open the browser, and php determines whether to open the browser.
# Problem
Problems encountered in the project, if the user is using access.
"How to use a browser to open/tell users how to use a browser to open"
Solution
Useragent is a browser identifier with some customer information, such as the browser kernel and operating system.
Accessing a webpage is also a browser, and it also has UA. Then, you can determine whether its UA is accessed.
$ Ua = $ _ SERVER ['HTTP _ USER_AGENT ']; // MicroMessenger comes with android/iphone versions // Windows Phone comes with winphone version (this ID will mistakenly hurt the access of winphone normal browsers) if (strpos ($ ua, 'micromessenger ') = false | strpos ($ ua, 'windows Phone') = false) {echo "access from a Common Browser ";} else {echo "access from a browser ";}
The above PHP judges whether the browser is open. The method of opening the browser is to share all the content with you. I hope to give you a reference, and I hope you can provide more support to the customer's house.