/** * @private * @static * Sets the right domain for the cookie * @return nothing */ function setSessionCookieDomain() { $scriptUrl = HttpVars::getBaseUrl(); $url = new Url($scriptUrl); $domain = $url->getHost(); // this won't work for top level domains and domains such as // 'localhost' or internal domains for obvious security reasons... // See comments in http://fi.php.net/manual/en/function.session-set-cookie-params.php if (count(explode('.', $domain)) > 1) { return $domain; } }