mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 01:01:41 +09:00
Issue 1227 Change Mobile User-Agent Check Logic and Add Mobile Agent.
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@10197 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
c183c272ec
commit
b5d4bfe9dc
1 changed files with 11 additions and 1 deletions
|
|
@ -55,7 +55,17 @@ class Mobile {
|
|||
|
||||
function isMobileCheckByAgent()
|
||||
{
|
||||
return !!preg_match('/(iPod|iPhone|Android|BlackBerry|SymbianOS|SCH-M\d+|SPH-M\d+|Windows Phone|Dorothy Browser|Googlebot-Mobile)/',$_SERVER['HTTP_USER_AGENT']);
|
||||
$mobildAgent = array('iPod','iPhone','iPad','Android','BlackBerry','SymbianOS','Bada','Kindle','Wii','SCH-','SPH-','CANU-','Windows Phone','Windows CE','POLARIS','Palm','webOS','Dorothy Browser','IEMobile','MobileSafari','Opera Mobi','Opera Mini','MobileExplorer','Minimo','AvantGo','NetFront','Googlebot-Mobile','Nokia','LGPlayer','SonyEricsson','HTC','hp-tablet','SKT','lgtelecom','Vodafone');
|
||||
|
||||
foreach($mobildAgent as $agent)
|
||||
{
|
||||
if(strpos($_SERVER['HTTP_USER_AGENT'], $agent) !== FALSE)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
function setMobile($ismobile)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue