Web UI for ARGUS server
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

16 lines
397 B

<?php
session_start();
if(!isset($_SESSION['state'])){
$_SESSION['state'] = array(
'sessionId'=>session_id()
);
}
foreach($_COOKIE as $name=>$value){
// look for state cookies
if(strpos($name, 'ys-') === 0){
// store in session
$_SESSION['state'][substr($name, 3)] = $value;
// remove cookie
setCookie($name, '', time()-10000, '/');
}
}