$user_agent = $_SERVER['HTTP_USER_AGENT']; $pattern = '/BlackBerry/i'; if (preg_match($pattern, $user_agent)) { header("Location: http://www.promptstore.com.au/mobile/index.php"); } ?>