What is the simplest way to tell if a user is using a mobile device to browse my site using PHP?
I have come across many classes that you can use but I was hoping fo
Simply you can follow the link. its very simple and very easy to use. I am using this. Its working fine.
http://mobiledetect.net/
use like this
//include the file
require_once 'Mobile_Detect.php';
$detect = new Mobile_Detect;
// Any mobile device (phones or tablets).
if ( $detect->isMobile() ) {
//do some code
}
// Any tablet device.
if( $detect->isTablet() ){
//do some code
}