I use the PHP code from: http://detectmobilebrowsers.mobi/
(free for personal and non-profit use)
From: Jonathan Rochkind [mailto:[log in to unmask]]
Sent: Wednesday, January 02, 2013 3:36 PM
To: Code for Libraries
Cc: Ken Irwin
Subject: Re: [CODE4LIB] directing users to mobile DBs, was RE: [CODE4LIB] Responsive Web Site Live
What method do you use to detect mobile-or-not?