Is a lightweight PHP class for detecting mobile devices. It uses the User-Agent string combined with specific HTTP headers to detect the mobile environment.
https://github.com/serbanghita/Mobile-Detect
origin - http://www.pipiscrew.com/?p=1027 php-mobiledetect