49                ini_set(
"session.hash_bits_per_character",
"4");
 
   52        session_name(isset($sessionName)
 
   61        if (strlen(session_id()) < 32)
 
   63                mt_srand ((
double)microtime()*1000000);
 
   64                session_id(md5(uniqid(mt_rand())));
 
   70        if  (   isset(
$_COOKIE[session_name()]) &&
 
   71                @strlen(
$_COOKIE[session_name()]) >= 32
 
   74        if  (   isset(
$_POST[session_name()]) &&
 
   75                @strlen(
$_POST[session_name()]) >= 32
 
   78        if  (   isset(
$_GET[session_name()]) &&
 
   79                @strlen(
$_GET[session_name()]) >= 32
 
   87                $query = @$_SERVER[
"QUERY_STRING"] != 
"" ? 
"?".$_SERVER[
"QUERY_STRING"] : 
"";
 
   89                header(
"Status: 302 Found");
 
  105### ------------------------------------------------------- 
  115        header(
"Expires: Sat, 05 Aug 2000 22:27:00 GMT");
 
  116        header(
"Last-Modified: " . gmdate(
"D, d M Y H:i:s") . 
" GMT");
 
  117        header(
"Cache-Control: no-cache, must-revalidate");
 
  118        header(
"Pragma: no-cache");
 
  119        header(
"Cache-Control: post-check=0, pre-check=0");        
 
  122### ------------------------------------------------------- 
  139        if ($pathInfo[0] != 
"/")
 
  140            {   $pathInfo = substr(getenv(
"PATH_INFO"),
 
  142                                   strrpos(getenv(
"PATH_INFO"),
"/")+1
 
  148        $port    = !preg_match( 
"/^(80|443)$/",
 
  149                                getenv(
"SERVER_PORT"),
 
  151                   ? 
":".getenv(
"SERVER_PORT")
 
  156               .(($portMatch[1] == 443) ? 
"https://" : 
"http://")
 
  157               .$_SERVER[
"HTTP_HOST"].$port.$this->url($pathInfo));
 
  161### ------------------------------------------------------- 
  169        $dummy = preg_match(
"/(.*)(?<!&|\?)/",$pathInfo,$match);
 
  173### ------------------------------------------------------- 
  181        if ($this->usesCookies || $this->transSID) 
return $pathInfo;
 
  184        $dummyArray = split(
"#",$pathInfo);
 
  185        $pathInfo = $dummyArray[0];
 
  188        $pathInfo = preg_replace(   
"/[?|&]".session_name().
"=[^&]*/",
 
  193        if (preg_match(
"/&/",$pathInfo) && !preg_match(
"/\?/",$pathInfo))
 
  196                $pathInfo = preg_replace(
"/&/",
"?",$pathInfo,1); 
 
  203        $pathInfo .= preg_match(
"/\?/",$pathInfo) ? 
"&" : 
"?";
 
  204        $pathInfo .= session_name().
"=".session_id();
 
  207        $pathInfo .= isset($dummyArray[1]) ? 
"#".$dummyArray[1] : 
"";
 
  212### ------------------------------------------------------- 
  223        if ($this->usesCookies || $this->transSID) 
return "";
 
  224        return "<INPUT  type=\"hidden\" 
  225                        name=\"".session_name().
"\" 
  226                        value=\"".session_id().
"\">";
 
"Manueller" Session-Fallback mit PHP4
url($pathInfo)
Fallback via GET - wenn Cookies ausgeschaltet sind.
hidden()
Fallback via HIDDEN FIELD - wenn Cookies ausgeschaltet sind.
Session($sessionName="SESSID")
Konstruktor - nimmt, wenn gewuenscht einen neuen Session-Namen entgegen.
removeTrail($pathInfo)
Entfernt mögliche abschließende "&" und "?".
redirectTo($pathInfo)
HTTP-Redirect ausführen (header("Location: ...")
sendNoCacheHeader()
Cacheing unterbinden.