mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-06 02:01:40 +09:00
setcookie for detected device
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@7575 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
875ab37b07
commit
074074623f
1 changed files with 7 additions and 1 deletions
|
|
@ -33,7 +33,13 @@ class Mobile {
|
|||
$this->ismobile = false;
|
||||
}
|
||||
else if($_COOKIE["mobile"]) $this->ismobile = true;
|
||||
else $this->ismobile = preg_match('/(iPod|iPhone|Android|BlackBerry|SCH\-M[0-9]+)/',$_SERVER['HTTP_USER_AGENT']);
|
||||
else {
|
||||
if(preg_match('/(iPod|iPhone|Android|BlackBerry|SCH\-M[0-9]+)/',$_SERVER['HTTP_USER_AGENT']))
|
||||
{
|
||||
setcookie("mobile", true);
|
||||
$this->ismobile = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $this->ismobile;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue