View Single Post
Old 12-04-2008, 06:30 PM   #1 (permalink)
9three
The Contributor
 
Join Date: Oct 2008
Posts: 75
Thanks: 4
9three is on a distinguished road
Default 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');

9three is offline  
Reply With Quote