index 4773fe17d015983240f9e792225de4bac9cc2561..4a98ad2dc6aa31bd2c67c050b05b3558ea58e707 100644 (file)
ini_set("session.gc_maxlifetime",24*60*60);
session_start();
ini_set("session.gc_maxlifetime",24*60*60);
session_start();
+ /* Check for changed browsers and bail out */
+ if (isset($_SESSION['HTTP_USER_AGENT']))
+ {
+ if ($_SESSION['HTTP_USER_AGENT'] != md5($_SERVER['HTTP_USER_AGENT'])) {
+ session_destroy();
+ session_start();
+ }
+ } else {
+ $_SESSION['HTTP_USER_AGENT'] = md5($_SERVER['HTTP_USER_AGENT']);
+ }
+
/* Regenerate ID to increase security */
if (!isset($_SESSION['started'])){
session_regenerate_id();
/* Regenerate ID to increase security */
if (!isset($_SESSION['started'])){
session_regenerate_id();
public static function destroy()
{
public static function destroy()
{
- session_destroy();
+ @session_destroy();
}
public static function set_lifetime($seconds = -1)
}
public static function set_lifetime($seconds = -1)