PHP Classes

PHP Mobile Device Detection: Detect mobile devices from request headers

Recommend this page to a friend!
  Info   View files Example   View files View files (2)   DownloadInstall with Composer Download .zip   Reputation   Support forum (1)   Blog    
Ratings Unique User Downloads Download Rankings
StarStarStar 41%Total: 680 This week: 1All time: 4,769 This week: 89Up
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  
Name: Zhao <contact>
Classes: 3 packages by
Country: Japan Japan
Age: 47
All time rank: 22889 in Japan Japan
Week rank: 93 Up1 in Japan Japan Up
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  
File Role Description
Files folder imagerbib (1 directory)
Accessible without login Plain text file example.php Example demo for device detector

  Files folder image Files  /  rbib  
File Role Description
Files folder imageutil (1 directory)

  Files folder image Files  /  rbib  /  util  
File Role Description
Files folder imagehttp (1 file)

  Files folder image Files  /  rbib  /  util  /  http  
File Role Description
  Plain text file DeviceDetector.php Class Mobile devices detector

 Version Control Unique User Downloads Download Rankings  
 0%
Total:680
This week:1
All time:4,769
This week:89Up
User Ratings User Comments (1)
 All time
Utility:56%StarStarStar
Consistency:68%StarStarStarStar
Documentation:-
Examples:62%StarStarStarStar
Tests:-
Videos:-
Overall:41%StarStarStar
Rank:3704
 
useful class.
8 years ago (Ovunc Tukenmez)
70%StarStarStarStar