From 824aa1372538093d847ac27e63d9840fa9b8c098 Mon Sep 17 00:00:00 2001 From: Christopher Latza Date: Sun, 7 Jun 2020 18:43:17 +0200 Subject: [PATCH] change convert --- start.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/start.php b/start.php index 2ebfd40..c26a1e1 100644 --- a/start.php +++ b/start.php @@ -22,8 +22,8 @@ while(TRUE) copy($fileName, "tmp/rtmp/".$fileName); unlink($fileName); - $jsonMessage = json_decode(file_get_contents("message.json"), TRUE); - + $jsonMessage = json_decode(file_get_contents("message.json")); + $jsonMessage['embeds']['description'] = str_replace("%%adresse%%", $StreamURL, $jsonMessage['embeds']['description']); $jsonMessage['embeds']['image'] = "https://files.clatza.dev/tmp/rtmp/".$fileName; @@ -37,6 +37,7 @@ while(TRUE) echo "Sending info to discord.\n"; $result = file_get_contents($DiscordWebhook, false, stream_context_create($options)); + print_r($options); }else{ echo "ERROR: Image not generated!\n"; }