Tip Detect Mobile Browsers and Agents w/ PHP

Use this script here to detect mobile browsers.…lass-function/

User Comment:
Nice share

User Comment:
thanks for sharing, but i hate paying for code like on that one site. You just never know if the person actually coded it right.

you can check this a few ways in PHP:

1. UserAgent ( can be faked )
2. Screen Resolution ( getting harder now with iPad and tablets that can do 800×600+ )
3. Javascript check ( some mobile cant do JS or Flash, but getting harder )
4. IP info ( if from a cellular hostname, but some of these hostnames are from companies that do mobile and broadband like verizon )

all in all, its getting harder but is still doable

The Article Published IN 07-22-2011 12:50 AM

Share To More ()