是否有办法在javascript或php中查看客户端设备的信息,是哪个请求服务器?这个设备是手机、平板电脑还是个人电脑?


is there any way to check the information of client device in javascript or php, which request to server? is this device mobile, tablet or pc?

我需要检测客户端设备在服务器端使用php或javascript?哪个是客户端设备,哪个浏览器正在使用该设备?

查看User-Agent标头

查看Tera-WURFL (http://dbapi.scientiamobile.com/wiki/index.php/Main_Page)。它是一个检测移动设备功能的API。我们在这里使用它来决定是否将用户转发到我们的应用程序的桌面或移动版本。

您可以使用$_SERVERHTTP_USER_AGENT http://php.net/manual/en/tutorial.useful.php

自动检测移动浏览器(通过user-agent?)

什么是用户代理?http://en.wikipedia.org/wiki/User_agent