dont parse json
This commit is contained in:
parent
824aa13725
commit
46931596f0
|
@ -10,7 +10,7 @@
|
||||||
"icon_url": "https://files.clatza.dev/Icons/git.png"
|
"icon_url": "https://files.clatza.dev/Icons/git.png"
|
||||||
},
|
},
|
||||||
"image": {
|
"image": {
|
||||||
"url": "https://files.clatza.dev/output.jpg"
|
"url": "%%vorschau%%"
|
||||||
},
|
},
|
||||||
"thumbnail": {
|
"thumbnail": {
|
||||||
"url": "https://files.clatza.dev/Icons/vlc.png"
|
"url": "https://files.clatza.dev/Icons/vlc.png"
|
||||||
|
|
10
start.php
10
start.php
|
@ -22,16 +22,16 @@ while(TRUE)
|
||||||
copy($fileName, "tmp/rtmp/".$fileName);
|
copy($fileName, "tmp/rtmp/".$fileName);
|
||||||
unlink($fileName);
|
unlink($fileName);
|
||||||
|
|
||||||
$jsonMessage = json_decode(file_get_contents("message.json"));
|
$jsonMessage = file_get_contents("message.json");
|
||||||
|
|
||||||
$jsonMessage['embeds']['description'] = str_replace("%%adresse%%", $StreamURL, $jsonMessage['embeds']['description']);
|
$jsonMessage = str_replace("%%adresse%%", $StreamURL, $jsonMessage);
|
||||||
$jsonMessage['embeds']['image'] = "https://files.clatza.dev/tmp/rtmp/".$fileName;
|
$jsonMessage = str_replace("%%vorschau%%", "https://files.clatza.dev/tmp/rtmp/".$fileName, $jsonMessage);
|
||||||
|
|
||||||
$options = [
|
$options = [
|
||||||
'http' => [
|
'http' => [
|
||||||
'method' => 'POST',
|
'method' => 'POST',
|
||||||
'header' => 'Content-Type: application/json',
|
'header' => 'Content-Type: application/json',
|
||||||
'content' => json_encode($jsonMessage)
|
'content' => $jsonMessage
|
||||||
]
|
]
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue