From d3821293c50b96f103fa5eebf52fc6b7dbef66bd Mon Sep 17 00:00:00 2001 From: Christopher Date: Mon, 15 Jun 2020 16:29:14 +0000 Subject: [PATCH] =?UTF-8?q?=E2=80=9Estart.php=E2=80=9C=20=C3=A4ndern?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- start.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/start.php b/start.php index 32563e6..aeec284 100644 --- a/start.php +++ b/start.php @@ -55,10 +55,13 @@ while(TRUE) echo "done.\n"; system("rtmpdump -r ".$StreamURL." -m 15 -o /dev/null"); - - echo "Sending end info to discord..."; - $result = file_get_contents($DiscordWebhook, false, stream_context_create($endOptions)); - echo "done.\n"; + + if(($lastOnlineTime + 60) < time()) + { + echo "Sending end info to discord..."; + $result = file_get_contents($DiscordWebhook, false, stream_context_create($endOptions)); + echo "done.\n"; + } }else{ echo "ERROR: Image not generated!\n"; }