From 609dc69c1332813c3a367e184663e498c4f559ff Mon Sep 17 00:00:00 2001 From: RaindropsSys Date: Fri, 24 Mar 2023 08:54:44 +0100 Subject: Updated 2 files and added pages/api/badger.php (automated) --- pages/api/emergency.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'pages/api/emergency.php') 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 -- cgit