3 if(!isset($_SESSION['state'])){
4 $_SESSION['state'] = array(
5 'sessionId'=>session_id()
8 foreach($_COOKIE as $name=>$value){
9 // look for state cookies
10 if(strpos($name, 'ys-') === 0){
12 $_SESSION['state'][substr($name, 3)] = $value;
14 setCookie($name, '', time()-10000, '/');