Follow along with the video below to see how to install our site as a web app on your home screen.
Бележка: This feature may not be available in some browsers.
$rss = simplexml_load_file("http://sinoptik.bg/genrss.php?lid=100727011");
if ($rss != "")
{
foreach ($rss->xpath('//item[1]') AS $item)
{
$meteo = $item->description[0] = str_replace('|','<br />', $item->description[0]);
$arr = array();
$arr = explode("<br />", $meteo);
$img = explode('src="', $arr[0]);
$img = explode('" align', $img[1]);
$state = explode ("Състояние:", $arr[0]);
$state = explode("<br />", $state[1]);
$meteo_state = $state[0];
$meteo_img = $arr[0] = $img[0];
$meteo_temp = $arr[1];
$meteo_felt = $arr[2];
$meteo_wind = $arr[3];
$meteo_force = $arr[4];
echo "<div style=\"margin:10px;\"><img align=\"left\" style=\"margin-right:10px; margin-top:10px; width:50px;\" src=\"".$meteo_img."\" alt=\"София - ".$meteo_temp."\">
<div style=\"padding-left:60px;\">
<span style=\"font-size:9px;\">".$meteo_state."</span><br>
<span style=\"font-size:9px;\">".$meteo_temp."</span><br>
<span style=\"font-size:9px;\">".$meteo_felt."</span><br>
<span style=\"font-size:9px;\">".$meteo_wind."</span><br>
<span style=\"font-size:9px;\">".$meteo_force."</span></div></div>";
//$arr['stranica'] = $item->title[0];
}
}
embaka каза:...