Story/php
detect-mobile-devices 모바일 체크
Stdio
2015. 9. 21. 10:26
반응형
<?php
// Include and instantiate the class.
require_once
'Mobile_Detect.php'
;
$detect
=
new
Mobile_Detect;
// Any mobile device (phones or tablets).
if
(
$detect
->isMobile() ) {
}
// Any tablet device.
if
(
$detect
->isTablet() ){
}
// Exclude tablets.
if
(
$detect
->isMobile() && !
$detect
->isTablet() ){
}
// Check for a specific platform with the help of the magic methods:
if
(
$detect
->isiOS() ){
}
if
(
$detect
->isAndroidOS() ){
}
?>
출처
http://www.bitrepository.com/detect-mobile-devices-on-front-end-and-back-end.html
반응형