実行結果' ; $html .= '
' ; // 各メソッドを実行する foreach( array( 'isiOS' , 'isAndroidOS' , 'isWindowsMobileOS' , 'isWindowsPhoneOS' ) as $method ) { $html .= '
' . $method . '()
' ; $html .= '
' . ( ( $detect->{ $method }() ) ? 'true' : 'false' ) . '
' ; } $html .= '
' ; ?> Mobile Detectで、端末のOSを判定するサンプルデモ

配布元: Syncer