Bu çözümü kullanarak deneyebilirsiniz.
concurrent_users.php
// created cookie with createdSessionID
$cookie_array = explode("-", $_COOKIE['cookie']); //retrieve contents of cookie in an array
//print("cookie:" . $cookie_array[0]); //display the content
//Retrieve data from TBL_LogUsersCurrent
$QueryI = "SELECT * FROM TBL_LogUsersCurrent WHERE UserID=".$_SESSION['SessionUserID']."";
$ResultI = mysql_query($QueryI);
//fetch the query result
$Row = mysql_fetch_array($ResultI,MYSQL_NUM);
$Arr_Row = $Row[4];
//echo "database:" .$Arr_Row;
//compare the createdSessionID in cookie and database
if ($cookie_array[0] != $Arr_Row) {
//redirect the user to login page if already the user has logged in
header ("Location: http://" . $_SERVER['HTTP_HOST'] . "/". $SystemFolder . "/index.html?AS=1$extraA");
mysql_close();
//Deleting Cookies:Expiration date should be in the past, to trigger the removal mechanism in the browser.
setcookie("cookie", $_SESSION['createdSessionID'],time() - 3600);
exit();
}