12-04-2008, 06:30 PM
|
#1 (permalink)
|
|
The Contributor
Join Date: Oct 2008
Posts: 75
Thanks: 4
|
Stopping session hijacking
Would this work?
PHP Code:
session_start();
session_regenerate_id();
if (session_regenerate_id() != $_SERVER['HTTP_USER_AGENT'])
{
$_SESSION = array();
session_unset();
session_destroy();
header('Location: index.php');
}
|
|
|
|