Code: Select all
function cookieCheck(){
//Check for robots and allow them to see the site
if (preg_match ( "/Google/", $_SERVER['HTTP_USER_AGENT'])){
//It's a robot
exit();
}
//Check for cookies first
if (!isset($_COOKIE['State']) and !isset($_SESSION['State'])){
ini_set('session.use_trans_sid', true);
$_SESSION['Page'] = $_SERVER['SCRIPT_NAME'];
setcookie("Page", $_SERVER['SCRIPT_NAME'], time() + (60*60));
header("Location: http://legacykc.janasnyder.com/entry?PHPSESSID=".session_id());
exit();
}elseif (isset($_COOKIE['State'])){
ini_set('session.use_trans_sid', false);
$State = $_COOKIE['State'];
setcookie("State", $State, time() + (60*60*24*365*2));
}
}//End of cookieCheck functionTitle: 200 OK
Does anybody have experience with this? Why is Apache not going straight to my page?OK
The document has moved here.