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"; }