summaryrefslogtreecommitdiff
path: root/api/pleasure-real.php
diff options
context:
space:
mode:
authorMinteck <contact@minteck.org>2022-08-26 22:29:23 +0200
committerMinteck <contact@minteck.org>2022-08-26 22:29:23 +0200
commit09bd0164ebc020a54b944b7326dcba496fb5d82c (patch)
tree0c5e765e627ecc94e534ccb6e2bc83917d58dc4c /api/pleasure-real.php
parenta2df9a69dcc14cb70118cda2ded499055e7ee358 (diff)
downloadpluralconnect-09bd0164ebc020a54b944b7326dcba496fb5d82c.tar.gz
pluralconnect-09bd0164ebc020a54b944b7326dcba496fb5d82c.tar.bz2
pluralconnect-09bd0164ebc020a54b944b7326dcba496fb5d82c.zip
idk when was the last commit so I'm making a new one - Violet Dawn
Diffstat (limited to 'api/pleasure-real.php')
-rw-r--r--api/pleasure-real.php23
1 files changed, 23 insertions, 0 deletions
diff --git a/api/pleasure-real.php b/api/pleasure-real.php
new file mode 100644
index 0000000..992f659
--- /dev/null
+++ b/api/pleasure-real.php
@@ -0,0 +1,23 @@
+<?php
+
+require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/session.php"; global $isLoggedIn;
+if (!$isLoggedIn) header("Location: /login") and die();
+global $_PROFILE;
+
+if ($_PROFILE['login'] === "raindrops") $pony = "Cloudy"; else $pony = "Lavender";
+$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: 🏩 $pony wants to play for a bit\r\n" .
+ "Priority: high\r\n" .
+ "Tags: pleasure\r\n" .
+ "Authorization: Basic " . base64_encode($ntfy["user"] . ":" . $ntfy["password"]),
+ 'content' => "Hey, $pony wants to play and have fun for a bit, get up!"
+ ]
+]));
+
+die(); \ No newline at end of file