当前位置:Gxlcms > PHP教程 > PHP判断客户端是IOS还是Android

PHP判断客户端是IOS还是Android

时间:2021-07-01 10:21:17 帮助过:21人阅读

  1. if(strpos($_SERVER['HTTP_USER_AGENT'], 'iPhone')||strpos($_SERVER['HTTP_USER_AGENT'], 'iPad')){
  2. echo 'systerm is IOS';
  3. }else if(strpos($_SERVER['HTTP_USER_AGENT'], 'Android')){
  4. echo 'systerm is Android';
  5. }else{
  6. echo 'systerm is other';
  7. }
  8. ?>

PHP, IOS, Android

人气教程排行