diff options
Diffstat (limited to 'pages/api/emergency-real.php')
-rw-r--r-- | pages/api/emergency-real.php | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/pages/api/emergency-real.php b/pages/api/emergency-real.php index 1e4c0e9..d0412c8 100644 --- a/pages/api/emergency-real.php +++ b/pages/api/emergency-real.php @@ -24,4 +24,17 @@ file_get_contents('https://' . $ntfy["server"] . '/' . $ntfy["topic"], false, st ] ])); +file_get_contents('https://' . $ntfy["server"] . '/emergency', 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 |