$placename_01 = 'Slovenija'; // city where you want local weather
$lang = 'sl';
$place_01=urlencode($placename_01);
$place_01 = utf8_encode($place_01);
$url = 'http://meteo.arso.gov.si/uploads/probase/www/fproduct/text/sl/fcast_SLOVENIA_latest.xml';
$ch = curl_init();
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt ($ch, CURLOPT_URL, $url);
curl_setopt ($ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);
curl_setopt ($ch, CURLOPT_TIMEOUT, 60);
curl_setopt ($ch, CURLOPT_FOLLOWLOCATION, 0);
$raw_data = curl_exec ($ch);
curl_close ($ch);
$xml = simplexml_load_string($raw_data);
$vreme_tekst = $xml->metData[0]->nn_shortText;
$min_temp = $xml->metData[0]->tn;
$max_temp = $xml->metData[0]->tx;
$dan_tednu = $xml->metData[0]->valid_day;
$datum = $xml->metData[0]->tsValid_issued_RFC822;
$icon_01 = $xml->metData[0]->nn_icon;
$dez_01 = $xml->metData[0]->wwsyn_icon;
$mocdez_01 = $xml->metData[0]->rr_icon;
$meglaicon_01 = $xml->metData[0]->fog_icon;
?>