summaryrefslogtreecommitdiff
path: root/pages/api/emergency.php
diff options
context:
space:
mode:
Diffstat (limited to 'pages/api/emergency.php')
-rw-r--r--pages/api/emergency.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/pages/api/emergency.php b/pages/api/emergency.php
index 5815148..2f764b1 100644
--- a/pages/api/emergency.php
+++ b/pages/api/emergency.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: [Test] ⚠️🆘 EMERGENCY ⚠️🆘\r\n" .
+ "Priority: urgent\r\n" .
+ "Tags: emergency\r\n" .
+ "Authorization: Basic " . base64_encode($ntfy["user"] . ":" . $ntfy["password"]),
+ 'content' => "[This notification is test] This is an emergency, " . $_PROFILE['name'] . " is in need of IMMEDIATE help. Please act now! [This notification is test]"
+ ]
+]));
+
die(); \ No newline at end of file