PHP 判断客户端是IOS还是Android

180it 2020-01-02 PM 2296℃ 0条
<?php

if(strpos($_SERVER['HTTP_USER_AGENT'], 'iPhone')||strpos($_SERVER['HTTP_USER_AGENT'], 'iPad')){

    echo 'systerm is IOS';

}else if(strpos($_SERVER['HTTP_USER_AGENT'], 'Android')){

    echo 'systerm is Android';

}else{

    echo 'systerm is other';

}

?>
支付宝打赏支付宝打赏 微信打赏微信打赏

如果文章或资源对您有帮助,欢迎打赏作者。一路走来,感谢有您!

标签: none

PHP 判断客户端是IOS还是Android