File: index.php

Recommend this page to a friend!
  Classes of Haseeb Ahmad Basil  >  PHP Mobile Detection Class  >  index.php  >  Download  
File: index.php
Role: Example script
Content type: text/plain
Description: Example script
Class: PHP Mobile Detection Class
Detect the type of mobile device checking headers
Author: By
Last change: Fixed a Typo
Date: 5 years ago
Size: 525 bytes
 

 

Contents

Class file image Download
<?php

include "Mobile_Detect.php";

$mobdect = new mobile_detect();
//Check to see of the device is a tabelt
$isTablet = $mobdect->isTablet();
//Check to see if the device is a Mobile
$isMobile = $mobdect->isMobile();
//Get all the predefined properties
$properties = $mobdect->getproperties();
var_dump($mobdect);
var_dump($isTablet);
var_dump($isMobile);
var_dump($properties);
foreach(
$properties as $key => $value)
{
   
//Check to see what are the versions of the properties
   
var_dump("$key =>",$mobdect->version($key));
}


For more information send a message to info at phpclasses dot org.