1
0
Fork 0

Compare commits

...

2 Commits

Author SHA1 Message Date
Christopher Latza 3546f779b7 set last time 2020-06-15 18:37:08 +02:00
Christopher Latza 303a682eb1 set timeout down for offline message 2020-06-15 18:36:16 +02:00
1 changed files with 3 additions and 2 deletions

View File

@ -53,10 +53,11 @@ 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");
if(($lastOnlineTime + 60) < time())
if(($lastOnlineTime + 10) < time())
{
echo "Sending end info to discord...";
$result = file_get_contents($DiscordWebhook, false, stream_context_create($endOptions));