1
0
mirror of https://github.com/serega404/VodokanalBot.git synced 2025-08-28 16:04:40 +03:00
This commit is contained in:
2021-08-20 00:25:46 +03:00
parent 766356b3bb
commit 888b663520

View File

@@ -17,7 +17,7 @@ if (file_exists("db.json")) {
// get DOM from URL // get DOM from URL
$html = file_get_html($config['url']); $html = file_get_html($config['url']);
$all_elements; $all_elements = null;
$dateNow = date("d.m.Y"); $dateNow = date("d.m.Y");
echo "Date now: " . $dateNow . "\n"; echo "Date now: " . $dateNow . "\n";
@@ -36,6 +36,11 @@ foreach ($html->find('td[bgcolor="#ffffff"]') as $e) {
} }
} }
if ($all_elements == null) {
echo "Posts not dound";
exit;
}
echo "The number of posts for this day: " . count($all_elements) . "\n"; echo "The number of posts for this day: " . count($all_elements) . "\n";
if ($db != null) { if ($db != null) {