|
|
@ -33,7 +33,7 @@ class Request {
|
|
|
|
{
|
|
|
|
{
|
|
|
|
$isMobile = false;
|
|
|
|
$isMobile = false;
|
|
|
|
$userAgent = $this->getUserAgent();
|
|
|
|
$userAgent = $this->getUserAgent();
|
|
|
|
$mobileAgents = ['Android', 'iPhone', 'SymbianOS', 'Windows Phone', 'iPad','iPod'];
|
|
|
|
$mobileAgents = ['Android', 'iPhone', 'SymbianOS', 'Windows Phone', 'iPad', 'iPod'];
|
|
|
|
foreach ($mobileAgents as $mobileAgent) {
|
|
|
|
foreach ($mobileAgents as $mobileAgent) {
|
|
|
|
if (stripos($userAgent, $mobileAgent) !== false) {
|
|
|
|
if (stripos($userAgent, $mobileAgent) !== false) {
|
|
|
|
$isMobile = true;
|
|
|
|
$isMobile = true;
|
|
|
@ -45,7 +45,7 @@ class Request {
|
|
|
|
public function isIOS()
|
|
|
|
public function isIOS()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
$userAgent = $this->getUserAgent();
|
|
|
|
$userAgent = $this->getUserAgent();
|
|
|
|
if(stripos($userAgent, 'iphone') !== false || strpos($userAgent, 'ipad') !== false) {
|
|
|
|
if(stripos($userAgent, 'iphone') !== false || stripos($userAgent, 'ipad') !== false || stripos($userAgent, 'ipod') !== false) {
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|