$fingerprintHash, "ip" => $ip, "created" => time() ]; file_put_contents($tokenMapFile, json_encode($tokens, JSON_PRETTY_PRINT)); setcookie("verify_token", $token, [ "expires" => time() + (60 * 60 * 24 * 30), "path" => "/", "httponly" => true, "secure" => false, "samesite" => "Strict" ]); /* Secure cookie */ setcookie( "verify_token", $token, [ "expires" => time() + (60 * 60 * 24 * 30), // 30 days "path" => "/", "httponly" => true, "secure" => false, // set true if HTTPS "samesite" => "Strict" ] ); header("Location: ../../index.php"); exit; } ?>