php class that detects whether the user is using the mobile phone of Mobile to visit a website

  • 2020-12-16 05:52:58
  • OfStack

Download address http: / / code. google. com p/php - mobile - detect /

The program is a file, after downloading directly reference can be, based on MIT License protocol open source PHP program

Usage:


<?php
include("Mobile_Detect.php");
$detect = new Mobile_Detect();

if ($detect->isMobile()) {
    // any mobile platform
    echo 'isMobile';
}
else{
    echo 'isPC';
}
?>


Related articles: