events wip

This commit is contained in:
salam committed 2025-08-28 10:43:50 +02:00
1 parent 8d623755ca
commit a7e09c6590
25 files changed
+1112 -384

No files matched your search

@@ -13,19 +13,24 @@ class FixturesSoccer
{
public static function call()
{
$debug = NuhBash::$options['debug'] ?? 0;
$debug = NuhBash::$options['d'] ?? 0;
$print = NuhBash::$options['p'] ?? 0;
$total = 0;
for ($i = 0; $i < 30; $i++) {
$str1 = date('Y-m-d', mktime(0, 0, 0, date('m'), date('d') + $i, date('Y')));
$str2 = date('Y-m-d', mktime(0, 0, 0, date('m'), date('d') + 1 + $i, date('Y')));
$url = 'https://xml2.txodds.com/feed/result/xml.php?ident=betaid1&passwd='.config('nuh.txodds_token')."&date=$str1,$str2&json=2";
$data = Curl::load($url, $debug);
$i = 0;
if ($print) {
Notice::note($data, '', 1);
}
$count = 0;
foreach ($data['match'] as $row) {
$i++;
$count++;
$txodds_id = array_column($row, 'id');
$spid = array_column($row['group'], 'spid');
$liga_id = TxLigas::find($row['group']);
@@ -43,7 +48,9 @@ class FixturesSoccer
]);
// dd($event);
}
Notice::note("$i events processed", 'g');
Notice::note("$str1 - $count events processed", 'g');
$total += $count;
}
Notice::note("Total - $total events processed", 'g');
}
}