The lightweight PHP class for detecting mobile devices (including tablets).

http://mobiledetect.net/