Location: PHPKode > scripts > WH Board > wh_board/framework/session.php
<?php

    ini_set('session.use_cookies', 1);
    ini_set('session.use_only_cookies', 'on');
    ini_set('session.use_only_cookies', 1);
    ini_set('session.use_trans_sid', 0);

    session_start();

    if(isset($_SESSION['signed_in'])) {

            if(!isset($_SESSION['signed_in'])) {

                session_regenerate_id();
                $_SESSION['signed_in'] = TRUE;
                }

            if(isset($_SESSION['REMOTE_ADDR'])) {

                if($_SESSION['REMOTE_ADDR'] != $_SERVER['REMOTE_ADDR']) {
                exit;
                }

            }else{

            $_SESSION['REMOTE_ADDR'] = $_SERVER['REMOTE_ADDR'];
            }

            if(isset($_SESSION['HTTP_USER_AGENT'])) {

                if($_SESSION['HTTP_USER_AGENT'] != sha1($_SERVER['HTTP_USER_AGENT'])) {
                exit;
                }

        }else{

        $_SESSION['HTTP_USER_AGENT'] = sha1($_SERVER['HTTP_USER_AGENT']);
        }
    }


    function close_connection() {
        if($_SESSION['signed_in'] == TRUE) {

            $_SESSION['signed_in'] = NULL;
            $_SESSION = array();
            }

        session_destroy();

        if(!isset($connect))
        return;

        mysql_close($connect);
        }

?>
Return current item: WH Board