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