#$_SESSION = array(); #echo $_SERVER['REQUEST_URI']; function mobile_detect() { $user_agent = $_SERVER['HTTP_USER_AGENT']; $ipod = strpos($user_agent,"iPod"); $iphone = strpos($user_agent,"iPhone"); $android = strpos($user_agent,"Android"); $symb = strpos($user_agent,"Symbian"); $winphone = strpos($user_agent,"WindowsPhone"); $wp7 = strpos($user_agent,"WP7"); $wp8 = strpos($user_agent,"WP8"); $operam = strpos($user_agent,"Opera M"); $palm = strpos($user_agent,"webOS"); $berry = strpos($user_agent,"BlackBerry"); $mobile = strpos($user_agent,"Mobile"); $htc = strpos($user_agent,"HTC_"); $fennec = strpos($user_agent,"Fennec/"); if ($fennec) { return true; } else { return false; } } if(mobile_detect()) { header('location: http://m.7light.ru'); exit(); } ?> session_start(); #$_SESSION = array(); #var_dump($_SESSION); if(!isset($_SESSION['no_first'])) { $_SESSION['no_first'] = true; $_SESSION['source'] = "Реферер: ".$_SERVER['HTTP_REFERER']."; GET-запрос: ".$_SERVER['REQUEST_URI']; } #echo $_SESSION['source']; $uri = preg_replace("/#.+/", "", $_SERVER['REQUEST_URI']); $uri = preg_replace("/\?.+/","", $_SERVER['REQUEST_URI']); if(!empty($_POST)) { include('form.php'); //header('location: http://7light.ru'); //exit(); } #echo $uri; ?>