|
@@ 705-716 (lines=12) @@
|
| 702 |
|
* Mozilla/5.0 (Mobile; rv:14.0) Gecko/14.0 Firefox/14.0 |
| 703 |
|
* |
| 704 |
|
*/ |
| 705 |
|
static function is_firefox_os( ) { |
| 706 |
|
|
| 707 |
|
if ( empty( $_SERVER['HTTP_USER_AGENT'] ) ) |
| 708 |
|
return false; |
| 709 |
|
|
| 710 |
|
$ua = strtolower( $_SERVER['HTTP_USER_AGENT'] ); |
| 711 |
|
|
| 712 |
|
if ( strpos( $ua, 'mozilla' ) !== false && strpos( $ua, 'mobile' ) !== false && strpos( $ua, 'gecko' ) !== false && strpos( $ua, 'firefox' ) !== false) |
| 713 |
|
return true; |
| 714 |
|
else |
| 715 |
|
return false; |
| 716 |
|
} |
| 717 |
|
|
| 718 |
|
|
| 719 |
|
/* |
|
@@ 731-744 (lines=14) @@
|
| 728 |
|
* Opera/9.80 (Windows NT 6.1; Opera Mobi/14316; U; en) Presto/2.7.81 Version/11.00" |
| 729 |
|
* Opera/9.50 (Nintendo DSi; Opera/507; U; en-US) |
| 730 |
|
*/ |
| 731 |
|
static function is_opera_mobile( ) { |
| 732 |
|
|
| 733 |
|
if ( empty( $_SERVER['HTTP_USER_AGENT'] ) ) |
| 734 |
|
return false; |
| 735 |
|
|
| 736 |
|
$ua = strtolower( $_SERVER['HTTP_USER_AGENT'] ); |
| 737 |
|
|
| 738 |
|
if ( strpos( $ua, 'opera' ) !== false && strpos( $ua, 'mobi' ) !== false ) |
| 739 |
|
return true; |
| 740 |
|
elseif ( strpos( $ua, 'opera' ) !== false && strpos( $ua, 'nintendo dsi' ) !== false ) |
| 741 |
|
return true; |
| 742 |
|
else |
| 743 |
|
return false; |
| 744 |
|
} |
| 745 |
|
|
| 746 |
|
|
| 747 |
|
/* |