PHP Classes

PHP Mobile Device Detection: Detect mobile devices from request headers

Recommend this page to a friend!
     
  Info   Example   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
StarStarStar 41%Total: 682 All time: 4,766 This week: 42Up
Version License PHP version Categories
device-detection 1.0Q Public License ...5.0HTTP, PHP 5
Description 

Author

This class can detect mobile devices from request headers.

It can check the HTTP Accept request header and search for patterns that are used by mobile device browsers.

The class can also check first the values of specific GET or COOKIE request values to determine if the current device should be assumed to be mobile or not.

Picture of Zhao
  Performance   Level  
Innovation award
Innovation award
Nominee: 1x

 

Recommendations

simple mobile detection
need php function to detect if user is on a mobile device or not

I need device logs and application history
my drive

What is the best PHP detect browser and device class?
Detect browser and device details with platform

Example

<?php

use rbib\util\http\DeviceDetector;

include
'rbib/util/http/DeviceDetector.php';

$mobile = DeviceDetector::isMobileDevice();

var_dump($mobile);


  Files folder image Files (2)  
File Role Description
Files folder imagerbib (1 directory)
Accessible without login Plain text file example.php Example demo for device detector

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 0%
Total:682
This week:0
All time:4,766
This week:42Up
User Ratings User Comments (1)
 All time
Utility:56%StarStarStar
Consistency:68%StarStarStarStar
Documentation:-
Examples:62%StarStarStarStar
Tests:-
Videos:-
Overall:41%StarStarStar
Rank:3749
 
useful class.
9 years ago (Ovunc Tukenmez)
70%StarStarStarStar