PHP Classes

What is the best PHP detect mobile class?: Detect Mobile Browser

Recommend this page to a friend!
  All requests RSS feed  >  What is the best PHP detect mobile cl...  >  Request new recommendation  >  A request is featured when there is no good recommended package on the site when it is posted. Featured requests  >  No recommendations No recommendations  

What is the best PHP detect mobile class?

Edit

Picture of Mark Hoggan by Mark Hoggan - 8 years ago (2015-12-18)

Detect Mobile Browser

This request is clear and relevant.
This request is not clear or is not relevant.

+4

I need a class to detect if the user is using a browser from a mobile device.

Ask clarification

3 Recommendations

PHP Mobile Detect: Detect whether the user is using a mobile device

This recommendation solves the problem.
This recommendation does not solve the problem.

+1

Picture of Mega sploder by Mega sploder Reputation 160 - 8 years ago (2016-02-18) Comment

Detect whether the user is using a mobile device


PHP Mobile Detection Class: Detect the type of mobile device checking headers

This recommendation solves the problem.
This recommendation does not solve the problem.

+3

Picture of Haseeb Ahmad Basil by Haseeb Ahmad Basil package author package author Reputation 445 - 8 years ago (2016-02-16) Comment

A Lightweight Mobile Detecting Script


PHP User Agent Parser class: Parse the user agent and extract browser details

This recommendation solves the problem.
This recommendation does not solve the problem.

+1

Picture of Manuel Lemos by Manuel Lemos Reputation 23770 - 8 years ago (2015-12-23) Comment

There are a few classes for this purpose. This one has been updated recently and can detect other browser capabilities besides detecting whether it is being run on a mobile device or not.

  • 1 Comment
  • 1. Picture of Mike Siers by Mike Siers - 8 years ago (2015-12-23) Reply

    download the zip file from mobiledetect.net above and here is the code to detect the type of device.

    include_once $_SERVER['DOCUMENT_ROOT'] . '/detect/Mobile_Detect.php';

    function deviceType() { $detect = new Mobile_Detect; $deviceType = ($detect->isMobile() ? ($detect->isTablet() ? 'tablet' : 'phone') : 'computer');

    $_SESSION['DeviceType']=$deviceType;

    return $deviceType; }


Recommend package
: 
: