mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-09 03:32:00 +09:00
User-Agent string checker update in Mobile class for PHP5
git-svn-id: http://xe-core.googlecode.com/svn/branches/maserati@12644 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
89490e2511
commit
e01a412e36
1 changed files with 2 additions and 5 deletions
|
|
@ -129,8 +129,7 @@ class Mobile {
|
||||||
if(isset($UACheck)) return $UACheck;
|
if(isset($UACheck)) return $UACheck;
|
||||||
|
|
||||||
$oMobile =& Mobile::getInstance();
|
$oMobile =& Mobile::getInstance();
|
||||||
// stripos is only for PHP5.
|
$mobileAgent = array('iPod','iPhone','Android','BlackBerry','SymbianOS','Bada','Tizen','Kindle','Wii','SCH-','SPH-','CANU-','Windows Phone','Windows CE','POLARIS','Palm','Dorothy Browser','Mobile','Opera Mobi','Opera Mini','Minimo','AvantGo','NetFront','Nokia','LGPlayer','SonyEricsson','HTC');
|
||||||
$mobileAgent = unserialize(strtolower(serialize(array('iPod','iPhone','Android','BlackBerry','SymbianOS','Bada','Tizen','Kindle','Wii','SCH-','SPH-','CANU-','Windows Phone','Windows CE','POLARIS','Palm','Dorothy Browser','Mobile','Opera Mobi','Opera Mini','Minimo','AvantGo','NetFront','Nokia','LGPlayer','SonyEricsson','HTC'))));
|
|
||||||
|
|
||||||
if($oMobile->isMobilePadCheckByAgent())
|
if($oMobile->isMobilePadCheckByAgent())
|
||||||
{
|
{
|
||||||
|
|
@ -140,9 +139,7 @@ class Mobile {
|
||||||
|
|
||||||
foreach($mobileAgent as $agent)
|
foreach($mobileAgent as $agent)
|
||||||
{
|
{
|
||||||
// stripos is only for PHP5..
|
if(stripos($_SERVER['HTTP_USER_AGENT'], $agent) !== FALSE)
|
||||||
$httpUA = strtolower($_SERVER['HTTP_USER_AGENT']);
|
|
||||||
if(strpos($httpUA, $agent) !== FALSE)
|
|
||||||
{
|
{
|
||||||
$UACheck = TRUE;
|
$UACheck = TRUE;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue