/** * Initializes session data * * Creates a session (or resumes the current one * based on the session id being passed * via a GET variable or a cookie). * You can provide your own name and/or id for a session. * * @param string $name string Name of a session, default is 'SessionID' * @param string $id string Id of a session which will be used * only when the session is new * * @static * @access public * @return void * @see session_name() * @see session_id() * @see session_start() */ function start($name = 'SessionID', $id = null) { HTTP_Session::name($name); if ($id) { HTTP_Session::id($id); } elseif (is_null(HTTP_Session::detectID())) { HTTP_Session::id($id ? $id : uniqid(dechex(rand()))); } session_start(); if (!isset($_SESSION['__HTTP_Session_Info'])) { $_SESSION['__HTTP_Session_Info'] = HTTP_SESSION_STARTED; } else { $_SESSION['__HTTP_Session_Info'] = HTTP_SESSION_CONTINUED; } }