const URL = 'https://www.gymcontrol.se/global/checkedin/checkedin.php?uid=9094'; export async function getVisitorCount(): Promise { const response = await fetch(URL, { signal: AbortSignal.timeout(5000) }); const raw = await response.text(); if (!response.ok) { throw new Error(`HTTP ${response.status}`); } const text = raw.trim(); if (!/^\d+$/.test(text)) { throw new Error(`Invalid response: ${JSON.stringify(text)}`); } return Number(text); }