$value) { if (!empty($value)) { setcookie($key, $value, [ "expires" => time() + (86400 * 90), // Sets cookie to expire in 90 days "path" => "/", "domain" => "$domain", "secure" => true, // Ensure cookies are only sent over HTTPS "httponly" => true, // Prevent client-side JavaScript access to cookies "samesite" => "Strict" // Strict SameSite policy for better protection against CSRF attacks ]); } else { setcookie($key, "", time() - 1000); } } } if (isset($_REQUEST["save"]) || isset($_REQUEST["reset"])) { header("Location: ./"); die(); } require_once "misc/header.php"; $opts = load_opts(); ?>