Bieten Sie Ihren Besuchern ein echtes interaktives Highlight! Unser Astro Radar 2026 liefert weit mehr als statische Infos, indem es Echtzeit Daten der NOAA mit präzisen Standort Analysen über eine Geocoding API kombiniert.
Ihre Vorteile als Hoster:
- Live Weltraumwetter: Ein integrierter KP Index Tracker zeigt die tatsächliche Wahrscheinlichkeit für Polarlichter in Deutschland in Echtzeit an, Schluss mit dem Raten!
- Präzision für 2026: Das Script ist speziell optimiert auf die große Sonnenfinsternis am 12. August 2026
- Echter Besucher Magnet: Steigern Sie Traffic und Verweildauer! Das Tool liefert Nutzern individuelle astronomische Daten (Sonnenuntergang, Dämmerung, Sichtbarkeit) basierend auf ihrem genauen Wohnort.
- SEO & Performance Boost: Profitieren Sie von schlankem Code ohne Ballast für Top Rankings in Suchmaschinen.
Dieses leistungsstarke Tool ist ideal für Nischenseiten, Nachrichtenportale oder Hobby Astronomen, die ihren Traffic durch hochwertige interaktive Mehrwerte steigern möchten. Laden Sie das Script jetzt herunter und starten Sie Ihr eigenes professionelles astronomisches Informationszentrum direkt auf Ihrer Domain!
<?php
$dirs = ['css', 'js', 'data'];
foreach ($dirs as $d) { if (!is_dir($d)) mkdir($d, 0755, true); }
$css = ":root{--space:#020205;--aurora:#00ffcc;--gold:#ffcc33;--glass:rgba(255,255,255,0.03)} body{background:var(--space);color:#e0e0e0;font-family:'Inter',sans-serif;margin:0;background-image:radial-gradient(circle at 50% 50%, #0d1117 0%, #020205 100%)} .container{max-width:1100px;margin:0 auto;padding:40px 20px;position:relative} .glass-card{background:var(--glass);backdrop-filter:blur(20px);border:1px solid rgba(255,255,255,0.08);border-radius:25px;padding:35px;margin-bottom:25px} h1{font-size:3rem;text-align:center;background:linear-gradient(45deg,#fff,var(--aurora));-webkit-background-clip:text;-webkit-text-fill-color:transparent} .grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:20px} .kp-badge{display:inline-block;padding:5px 15px;border-radius:10px;font-weight:bold;margin-top:10px} .btn-primary{background:linear-gradient(135deg,var(--aurora),#00a3ff);color:#000;border:none;padding:18px;border-radius:15px;font-weight:800;cursor:pointer;width:100%;transition:0.3s} input{width:100%;padding:15px;background:rgba(255,255,255,0.05);border:1px solid rgba(255,255,255,0.1);border-radius:10px;color:#fff;margin-bottom:15px;box-sizing:border-box} footer{text-align:center;padding:40px;opacity:0.5} a{color:var(--aurora);text-decoration:none}";
file_put_contents('css/astro.css', $css);
function getLiveKP() {
$url = "https://services.swpc.noaa.gov/products/noaa-estimated-planetary-k-index-1-minute.json";
$ctx = stream_context_create(["http" => ["timeout" => 2]]);
$data = @json_decode(file_get_contents($url, false, $ctx), true);
if (!$data) return 2.0; // Fallback
$latest = end($data);
return (float)$latest[1];
}
$current_kp = getLiveKP();
$kp_info = ($current_kp >= 5) ? ['Warnung: Geomagnetischer Sturm!', '#ff4d4d'] : ['Ruhiges Magnetfeld', '#00ffcc'];
$loc = null;
if (!empty($_POST['city'])) {
$city = urlencode($_POST['city']);
$geo = @json_decode(file_get_contents("https://nominatim.openstreetmap.org/search?q=$city&format=json&limit=1", false, stream_context_create(["http" => ["header" => "User-Agent: DreamcodesBot/1.0"]])), true);
if ($geo) {
$lat = $geo[0]['lat']; $lon = $geo[0]['lon'];
$astro = @json_decode(file_get_contents("https://api.sunrise-sunset.org/json?lat=$lat&lng=$lon&formatted=0"), true);
if ($astro) {
$loc = [
'name' => explode(',', $geo[0]['display_name'])[0],
'sunset' => date('H:i', strtotime($astro['results']['sunset'])),
'kp' => $current_kp
];
}
}
}
?>
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8">
<title>Astro Radar 2026 | Live KP Index & Finsternis</title>
<link rel="stylesheet" href="css/astro.css">
</head>
<body>
<div class="container">
<header>
<h1>Astro<span style="color:var(--aurora)">Radar</span> Live</h1>
<p style="text-align:center; opacity:0.7;">Echtzeit-Daten für Astronomie & Weltraumwetter</p>
</header>
<div class="grid">
<div class="glass-card" style="border-top: 3px solid <?= $kp_info[1] ?>;">
<div style="font-size:0.8rem; text-transform:uppercase; letter-spacing:1px;">Live Weltraumwetter</div>
<h2 style="margin:10px 0;">KP-Index: <?= number_format($current_kp, 1) ?></h2>
<div class="kp-badge" style="background:<?= $kp_info[1] ?>22; color:<?= $kp_info[1] ?>;">
<?= $kp_info[0] ?>
</div>
<p style="font-size:0.9rem; margin-top:15px;">
<?= ($current_kp >= 4) ? "Gute Chancen für Polarlichter in Norddeutschland!" : "Aktuell kaum Polarlicht-Aktivität in Mitteleuropa sichtbar." ?>
</p>
</div>
<div class="glass-card" style="border-top: 3px solid var(--gold);">
<div style="font-size:0.8rem; text-transform:uppercase; letter-spacing:1px;">Nächstes Großereignis</div>
<h2 style="margin:10px 0;">Sonnenfinsternis</h2>
<p><strong>12. August 2026</strong></p>
<p style="font-size:0.9rem;">Erste totale Finsternis über Europa seit Jahrzehnten. In Deutschland bis zu 90% Bedeckung.</p>
</div>
</div>
<section class="glass-card">
<h2>Individuelle Standort-Analyse</h2>
<form method="POST">
<input type="text" name="city" placeholder="Stadt eingeben..." required value="<?= htmlspecialchars($_POST['city'] ?? '') ?>">
<button type="submit" class="btn-primary">Daten für heute abrufen</button>
</form>
<?php if ($loc): ?>
<div style="margin-top:25px; padding:20px; background:rgba(255,255,255,0.05); border-radius:15px;">
<h3>Analyse für <?= $loc['name'] ?></h3>
<p>🌇 Heute Sonnenuntergang: <strong><?= $loc['sunset'] ?> Uhr</strong></p>
<p>✨ Wahrscheinlichkeit Polarlichter: <strong><?= ($loc['kp'] > 5) ? 'Hoch' : 'Sehr gering' ?></strong></p>
<p>🔭 Sichtbarkeit Sonnenfinsternis 2026: <strong>Sehr gut (Westeuropa-Vorteil)</strong></p>
</div>
<?php endif; ?>
</section>
<footer>
<p>© 2026 · <a href="https://www.dreamcodes.net">Dreamcodes</a>
</footer>
</div>
</body>
</html>
