123456789101112131415 |
- <?php
- require __DIR__ . '/vendor/autoload.php';
- $url = 'https://www.yr.no/place/Norway/Troms/Tromsø/Tromsø/forecast_hour_by_hour.xml';
- $forecast = new App\Yr\Forecast($url);
- echo '<pre>';
- var_dump($forecast->getLocation());
- foreach ($forecast->getTabular()->getBetween(
- $forecast->getSunset(), $forecast->getSunrise()->add(new \DateInterval('P1D'))
- ) as $time)
- echo $time . "\n";
- ?>
|