The MobileESP project open source mobile visitor detecting utility, seeks to provide web site developers an easy-to-use andlightweight API for detecting whether visitors are using a mobile device, and if so, what kind. The APIs provide simple boolean results (“true” or “false”) for identifying individual device categories (such as iPhone, BlackBerry, Android, and Windows Mobile), device capabilities (e.g., J2ME), and broad classes of devices, such as “iPhone Tier” (iPhone/Android/WebOS) and smartphones.

The code library is available in several popular programming languages: PHP, Java, APS.NET (C#), and Ruby for server-side detection, and JavaScript for more limited client-side detection. The APIs are designed to be consistent across code languages.
The project has support for most of the well-known devices and can even identify their capabilities.
The MobileESP project is easy to use, install, and customize.
Website: http://www.mobileesp.com/
Demo: http://blog.mobileesp.com/?page_id=101
Download: http://blog.mobileesp.com/?page_id=20