PHP Browser Detection and Redirection

时间秒杀一切 提交于 2020-01-21 09:06:29

问题


All,

My application supports IE7+, MOZILLA and other modern browsers. Anybody know of a very good browser detection and redirection PHP class? I came across this, but I am not sure if anybody used this:

http://chrisschuld.com/projects/browser-php-detecting-a-users-browser-from-php/#typicalusage

Thanks


回答1:


All you need is get_browser() and a recent browscap.ini that maps the user-agent string to a browser/version and its capabilities. You can get a usually very up-to-date browscap.ini version from http://browsers.garykeith.com/downloads.asp

Source:@VolkerK

WURLF is the ultimate way for mobile browser detection and a PHP API is available

Source:kgiannakakis




回答2:


Use PHP get_browser

get_browser — Tells what the user's browser is capable of



来源:https://stackoverflow.com/questions/2470965/php-browser-detection-and-redirection

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!