[ 'method' => 'POST', 'header' => "Content-Type: text/plain\r\n" . "Title: 🐴 Switch occurred in the $name\r\n" . "Priority: default\r\n" . "Tags: switch\r\n" . "Actions: view, Open on Cold Haze, https://ponies.equestria.horse/" . $fronters["members"][0]["name"] . "/, clear=true\r\n" . "Authorization: Basic " . base64_encode($ntfy["user"] . ":" . $ntfy["password"]), 'content' => ($fronters["members"][0]["display_name"] ?? $fronters["members"][0]["name"]) . " switched in just now" ] ])); file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/data.json-res", "affected: " . $input["type"] . " (" . gettype($input["type"]) . ")") and die(); } else { file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/data.json-res", "invalid method: " . $input["type"] . " (" . gettype($input["type"]) . ")") and die(); }