diff options
Diffstat (limited to 'api/emergency-real.php')
-rw-r--r-- | api/emergency-real.php | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/api/emergency-real.php b/api/emergency-real.php deleted file mode 100644 index 2dd7172..0000000 --- a/api/emergency-real.php +++ /dev/null @@ -1,22 +0,0 @@ -<?php - -require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/session.inc"; global $isLoggedIn; -if (!$isLoggedIn) header("Location: /-/login") and die(); -global $_PROFILE; - -$ntfy = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/app.json"), true)["ntfy"]; - -file_get_contents('https://' . $ntfy["server"] . '/' . $ntfy["topic"], false, stream_context_create([ - 'http' => [ - 'method' => 'POST', - 'header' => - "Content-Type: text/plain\r\n" . - "Title: ⚠️🆘 EMERGENCY ⚠️🆘\r\n" . - "Priority: urgent\r\n" . - "Tags: emergency\r\n" . - "Authorization: Basic " . base64_encode($ntfy["user"] . ":" . $ntfy["password"]), - 'content' => "This is an emergency, " . $_PROFILE['name'] . " is in need of IMMEDIATE help. Please act now!" - ] -])); - -die();
\ No newline at end of file |