public function start($name = 'NDK', $limit = 0, $path = '/', $domain = null, $secure = null) { session_name($name . '_SESSION'); $domain = isset($domain) ? $domain : Request::getServerName(); $https = isset($secure) ? $secure : isset($_SERVER['HTTPS']); session_set_cookie_params($limit, $path, $domain, $https, true); session_start(); if (empty($_SESSION['_NDK_SESSION_TOKEN_'])) { $_SESSION['_NDK_SESSION_TOKEN_'] = base64_encode(Request::getRemoteAddr() . Request::getHttpUserAgent()); } elseif ($_SESSION['_NDK_SESSION_TOKEN_'] != base64_encode(Request::getRemoteAddr() . Request::getHttpUserAgent())) { self::destroy(); session_start(); session_regenerate_id(true); __error__('Your session has been terminated !'); } }