Stadionzeitung gegen TDC Lindau 2 mit Jugendbeitrag vorbereiten

This commit is contained in:
2026-10-24 11:52:57 +02:00
parent bd8f1dd129
commit fd305673aa
37 changed files with 790 additions and 2 deletions

View File

@@ -94,6 +94,11 @@ if (!$lock || !flock($lock, LOCK_EX | LOCK_NB)) {
// --- HTTP-Helfer mit Browser-typischen Headern (gegen HTTP 418) ---
$fetch = static function (string $url, bool $json = true) use ($referer): string|false {
$ch = curl_init($url);
// Optionaler CLI-Ausweg bei defektem lokalem DNS; keine Systemänderung.
$dohUrl = PHP_SAPI === 'cli' ? (getenv('TSV_HTTP_DOH_URL') ?: '') : '';
if ($dohUrl !== '') {
curl_setopt($ch, CURLOPT_DOH_URL, $dohUrl);
}
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_FOLLOWLOCATION => true,