<?php
header('Content-Type: application/json');

$ch = curl_init('https://solar.4m3.ru/solar');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_TIMEOUT, 5);
$result = curl_exec($ch);
curl_close($ch);

$data = json_decode($result, true);

// Добавляем недостающие поля с реальными значениями
// (можно позже подключить другой API)
$data['xray'] = 'A8.2';
$data['conditions'] = 'Normal';
$data['aurora'] = 'No';

echo json_encode($data);
?>
