true, CURLOPT_FOLLOWLOCATION => true, CURLOPT_TIMEOUT => 25, CURLOPT_USERAGENT => 'Mozilla/5.0 EuroDreams Statistik' ]); $html = curl_exec($ch); $status = curl_getinfo($ch, CURLINFO_HTTP_CODE); curl_close($ch); return ($status === 200 && $html) ? $html : null; } function monthToNumber($month) { $months = [ 'January'=>'01','February'=>'02','March'=>'03','April'=>'04', 'May'=>'05','June'=>'06','July'=>'07','August'=>'08', 'September'=>'09','October'=>'10','November'=>'11','December'=>'12' ]; return $months[$month] ?? null; } foreach ($years as $year) { $html = fetchHtml("https://eu-dreams.com/results/$year"); if (!$html) continue; $text = strip_tags($html); $text = html_entity_decode($text, ENT_QUOTES | ENT_HTML5, 'UTF-8'); $lines = array_values(array_filter(array_map('trim', preg_split('/\R+/', $text)))); for ($i = 0; $i < count($lines); $i++) { if (preg_match('/^(Monday|Thursday)\s+(\d{1,2})\s+([A-Za-z]+)\s+(\d{4})$/', $lines[$i], $m)) { $day = str_pad($m[2], 2, '0', STR_PAD_LEFT); $month = monthToNumber($m[3]); if (!$month) continue; $date = "{$m[4]}-$month-$day"; if ($date < $startDate) continue; $nums = []; for ($j = $i + 1; $j < count($lines) && count($nums) < 7; $j++) { if (preg_match('/^\d+$/', $lines[$j])) { $nums[] = intval($lines[$j]); } } if (count($nums) === 7) { $main = array_slice($nums, 0, 6); sort($main); $allDraws[] = [ 'date' => $date, 'numbers' => $main, 'dream' => $nums[6] ]; } } } } $unique = []; $draws = []; foreach ($allDraws as $draw) { if (!isset($unique[$draw['date']])) { $unique[$draw['date']] = true; $draws[] = $draw; } } usort($draws, fn($a, $b) => strcmp($b['date'], $a['date'])); $json = json_encode([ 'source' => 'eu-dreams.com', 'updated_at' => date('c'), 'cache_seconds' => $cacheTime, 'count' => count($draws), 'draws' => $draws ], JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE); file_put_contents($cacheFile, $json); echo $json; exit; } ?>
Alle Ziehungen seit Beginn – automatisch von eu-dreams.com mit Server-Cache.
Erstellt 6 Zahlen plus Dream Number.
| Datum | Zahlen | Dream |
|---|

Made in RapidWeaver