9th Mar 2012, 09:45 AM | #1 |
Lead Generation Pro War Room Member Join Date: 2006 Location: United Kingdom.
Posts: 329
Thanks: 44
Thanked 55 Times in 44 Posts
|
Hi can someone help with this question please. I am using Quentin's mobile site builder. I now have to re-direct the mobile site to the main CRM site. Is there a script for this? and where can i get one from? Thanks in advance. The main site in not WP. Regards Para |
Last edited on 9th Mar 2012 at 10:11 AM. Reason: .........No problem i have found one thanks | |
9th Mar 2012, 10:11 AM | #2 |
Good Ole Southern Boy War Room Member |
<?php class Mobile { /** * @author Webarto.com * @version 1.1 (added force parameter to force non mobile version on mobile devices) * @copyright 2011 */ public $agent; public $device; public function check() { $this->agent = $_SERVER['HTTP_USER_AGENT']; $agent = $this->agent; $mobile = false; if($_GET['force'] == 1){ setcookie('force', 1, 0, '/', '.'.$_SERVER['HTTP_HOST']); return; } if($_COOKIE['force'] == 1) return; $agents = array( 'Android', 'Acer', 'Asus', 'Alcatel', 'Blackberry', 'HTC', 'HP', 'Huawei', 'LG', 'Motorola', 'Nokia', 'Palm', 'Samsung', 'SonyEricsson', 'ZTE', 'Mobile', 'iPhone', 'iPod', 'iPad', 'Mini', 'Playstation', 'DoCoMo', 'Benq', 'Vodafone', 'Sharp', 'Kindle', 'Nexus', 'Windows Phone' ); foreach($agents as $a){ if(stripos($agent, $a) !== false){ $mobile = true; $this->device = $a; } } return $mobile; } public function redirect($url) { header('Location: '.$url); } } ?> |
9th Mar 2012, 11:43 AM | #4 |
Lead Generation Pro War Room Member Join Date: 2006 Location: United Kingdom.
Posts: 329
Thanks: 44
Thanked 55 Times in 44 Posts
| |
Bookmarks |
Tags |
mobile, redirect, script |
| |