Reputation: 741
I have to load XML file about weather
api.yr.no/weatherapi/locationforecast/1.9/?lat=55.5575760;lon=9.3124340
in to PHP.
The XML file contains many information, I dont know how to start, can anyone tel me how to start ?
Upvotes: 0
Views: 303
Reputation: 27295
The start is to fetch die XML.
$xml = simplexml_load_string(file_get_contents("api.yr.no/weatherapi/locationforecast/1.9/?lat=55.5575760;lon=9.3124340"));
Then read the documentation how to get informations from that file.
http://php.net/manual/de/book.simplexml.php
Upvotes: 1