From 1e3666a27dcb8eac280c0c98642ea858906c49e1 Mon Sep 17 00:00:00 2001 From: Christopher Latza Date: Mon, 15 Jun 2020 18:46:16 +0200 Subject: [PATCH] expand time then offline message not aviable --- start.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/start.php b/start.php index 53a7552..f5fa652 100644 --- a/start.php +++ b/start.php @@ -53,7 +53,7 @@ while(TRUE) echo "Sending start info to discord..."; $result = file_get_contents($DiscordWebhook, false, stream_context_create($startOptions)); echo "done.\n"; - + $lastOnlineTime = time(); system("rtmpdump -r ".$StreamURL." -m 15 -o /dev/null"); @@ -62,6 +62,8 @@ while(TRUE) echo "Sending end info to discord..."; $result = file_get_contents($DiscordWebhook, false, stream_context_create($endOptions)); echo "done.\n"; + }else{ + $lastOnlineTime = $lastOnlineTime - 3600; } }else{ echo "ERROR: Image not generated!\n";