From: LeonardoBizzoni Date: Fri, 20 May 2022 06:41:22 +0000 (+0200) Subject: Finished live checker script X-Git-Url: http://git.leonardobizzoni.com/?a=commitdiff_plain;h=94fdffc5a76c2330c7c4d1fb2af6f04a957d73ea;p=highschool-graduation-project Finished live checker script --- diff --git a/www/vtuberIsLive.php b/www/vtuberIsLive.php index 563925a..4d5d6ba 100644 --- a/www/vtuberIsLive.php +++ b/www/vtuberIsLive.php @@ -49,6 +49,7 @@ while (true) { curl_close($ch); if (count($result["data"])) { + echo $login."\n"; $stmt = $app->db->pdo->prepare("update vtubers set live='twitch.tv/$login' where id=" . $vtuber["id"]); $stmt->execute(); $isLive = true; @@ -75,6 +76,7 @@ while (true) { for ($i = 0; $i < $length; $i++) { $tag = $result->item($i)->getAttribute("href"); if (str_contains($tag, "https://www.youtube.com/watch?v=")) { + echo $tag."\n"; $stmt = $app->db->pdo->prepare("update vtubers set live='$tag' where id=" . $vtuber["id"]); $stmt->execute(); $isLive = true;