0

I wants to detect if my website accessed through mobile devices , IPad , Tabs or thorugh common web access platform i.e. desktop or laptop.

According to access platform i wants to set different layout and css for each environment.

Any help or suggestion would be greatly appreciated.

Thanks

coder
  • 283
  • 4
  • 26
  • RTLM http://php.net/manual/en/function.get-browser.php – Marc B Jun 05 '13 at 17:36
  • If you need more information about the browser than give you `get_browser()` see the javascript library [Modernizr](http://modernizr.com/) _Modernizr is a JavaScript library that detects HTML5 and CSS3 features in the user’s browser._ And search information about `Responsive (Web) Design` ([Responsive Web Design: What It Is and How To Use It](http://coding.smashingmagazine.com/2011/01/12/guidelines-for-responsive-web-design/) – furas Jun 05 '13 at 17:53

2 Answers2

3

I'm using Mobile_Detect to do it and it works pretty good for me!

0

Use the get_browser command. It will return an array of all kinds of goodies about the user agent .

This relies on a file on the system called browscap.ini if your system's package manager doesn't support automatic update of this file then here is a resource that will help you keep your browscap.ini file up to date.

Orangepill
  • 24,500
  • 3
  • 42
  • 63