Now I need to customize the page returned by the webpage according to the user's browsing device, PC, IPAD or Android phone. How to do this?
Reply to discussion (solution)
Detect User-Agent
The page can only use User-Agent. User-Agent is not necessarily accurate.
The page can only use User-Agent. User-Agent is not necessarily accurate.
Under what circumstances would it be inaccurate?
You can use bookstarp mobile platform or computer
http://v3.bootcss.com/css/
http://www.w3cschool.cc/bootstrap/bootstrap-grid-system- example3.html
The page can only use User-Agent. User-Agent is not necessarily accurate.
Under what circumstances would it be inaccurate?
User-Agent is in the http protocol header. This thing can be changed. First change the browser’s User-Agent. Second packet capture modification. Third, you can write an http get request and pretend to be User-Agent. Wait, there are many ways.
The page can only use User-Agent. User-Agent is not necessarily accurate.
Under what circumstances would it be inaccurate?
User-Agent is in the http protocol header. This thing can be changed. First change the browser’s User-Agent. Second packet capture modification. Third, you can write an http get request and pretend to be User-Agent. Wait, there are many ways.
Oh, that’s right, but users in general scenarios won’t modify these, thank you! I decided to use this one, it’s simple and convenient.
Statement:The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn