Is there anything I need to add or is this the best security possible?
<?php
//Get Sessions Prepared;
session_start();
//If logged in, Logout;
if(!empty($_SESSION['username'])) {
//Remove Sessions to Logout the user;
$params = session_get_cookie_params();
setcookie(session_name(), '', time() - 42000,
$params["path"], $params["domain"],
$params["secure"], $params["httponly"]
);
session_destroy();
} else {
//If not logged in redirect to Homepage;
header("Location: http://gameshare.io/login");
}
?>