From e98e95d89939cdc1252d02df04ae8d91c6aa8c92 Mon Sep 17 00:00:00 2001 From: RaindropsSys Date: Mon, 27 Mar 2023 22:22:53 +0200 Subject: Updated 9 files, added 9 files, deleted 3 files and renamed includes/refresh/logo.inc (automated) --- includes/jobs/PKSystem.php | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 includes/jobs/PKSystem.php (limited to 'includes/jobs/PKSystem.php') diff --git a/includes/jobs/PKSystem.php b/includes/jobs/PKSystem.php new file mode 100644 index 0000000..c3fce1b --- /dev/null +++ b/includes/jobs/PKSystem.php @@ -0,0 +1,31 @@ + [ + 'method' => 'GET', + 'header' => + "Authorization: " . $app["other"]["token"] . "\r\n" + ] + ]); +} else { + $ctx = stream_context_create([ + 'http' => [ + 'method' => 'GET' + ] + ]); +} + +$data = file_get_contents("https://pluralkit.equestria.dev/v2/systems/$system", false, $ctx); + +if (trim($data) !== "" && $data !== false) { + file_put_contents("./data/$system/general.json", $data); +} \ No newline at end of file -- cgit