(.*?)<\/cloudness_str>/i',$pogoda,$yavleniya); preg_match('/(.*?)<\/humidity>/i',$pogoda,$vlaga2); preg_match('/(.*?)<\/temperature>/i',$pogoda,$temp2); preg_match('/(.*?)<\/temperature color="F0F0EC" plate="e5e5ba">/i',$pogoda,$img2); preg_match('/(.*?)<\/pressure>/i',$pogoda,$press); preg_match('/(.*?)<\/wind_direction_str>/i',$pogoda,$napravleniya); preg_match('/(.*?)<\/wind_speed>/i',$pogoda,$speed); preg_match('/(.*?)<\/water_temperature>/i',$pogoda,$osadki); preg_match('/(.*?)<\/dew_point>/i',$pogoda,$rosa); preg_match('/(.*?)<\/cloudness>/i',$pogoda,$vid); preg_match('/(.*?)<\/local_datetime>/i',$pogoda,$time); preg_match('/(.*?)<\/wind_speed_max>/i',$pogoda,$windmax); preg_match('/(.*?)<\/weather_type>/i',$pogoda,$weather_star); ?>
Сейчас в Калининграде:


                 $temp[1] °C


$yavleniya[1]
$weather_star[1]
Влажность: $vlaga[1] %
Давление: $press[1] мм.рт.с
Ветер: $napravleniya[1] $speed[1] м/с
Ощущается как: $rosa[1] °C
Видимость: $vid[1] км
Порывы ветра: $windmax[1] м/с
Осадки: $osadki[1] мм
Время обновления: $time[1]

"; echo $vivod;?>
30) get_xml($city_id); } $xml = simplexml_load_file($data_file); // xml $city=$xml->attributes()->city; $link=$xml->attributes()->link; $city = iconv('UTF-8', 'cp1251', $city); $temp=$xml->fact->temperature; $img='image-v3'; $pic=$xml->fact->$img; $type=$xml->fact->weather_type; $type=iconv('UTF-8', 'cp1251', $type); $press=$xml->fact->pressure; $humid=$xml->fact->humidity; $weather_type_short=$xml->fact->weather_type_short; $wind=$xml->fact->wind_speed; $more=$xml->fact->water_temperature; $inf_t=$xml->informer->temperature; $wnd_dir=$xml->fact->wind_direction; if ($wnd_dir==calm)$wnd_dir=e; if ($temp>0) {$temp='+'.$temp;} if ($inf_t[0]>0) {$inf_t[0]='+'.$inf_t[0];} if ($inf_t[1]>0) {$inf_t[1]='+'.$inf_t[1];} echo '
:
' .$temp .'C
' .$weather_type_short .'
' .$inf_t[0] .'C
' .$inf_t[1] .'C
+' .$more .'C
' .$wind .' /
' .$press .'
' .$humid .' %
'; } function get_sity($city_x) { $city_id_0=26702; // id //ya_pogoda($city_id); ?>
=================================================================
 +5

 

 79%
 755 ...
=====================================================================
========================================================================= (.*?)<\/cloudness_str>/i',$pogoda,$yavleniya); preg_match('/(.*?)<\/humidity>/i',$pogoda,$vlaga); preg_match('/(.*?)<\/temperature>/i',$pogoda,$temp); if ($temp[1]>0) {$temp[1]='+'.$temp[1];} preg_match('/(.*?)<\/sunrise>/i',$pogoda,$img2); preg_match('/(.*?)<\/pressure>/i',$pogoda,$press); preg_match('/(.*?)<\/wind_direction_str>/i',$pogoda,$napravleniya); preg_match('/(.*?)<\/wind_speed>/i',$pogoda,$speed); preg_match('/(.*?)<\/precip>/i',$pogoda,$osadki); preg_match('/(.*?)<\/dew_point>/i',$pogoda,$temp2); preg_match('/(.*?)<\/cloudness>/i',$pogoda,$vid); preg_match('/(.*?)<\/wind_speed_max>/i',$pogoda,$windmax); preg_match('/(.*?)<\/weather_str>/i',$pogoda,$weather_star); preg_match('/(.*?)<\/local_datetime>/i',$pogoda,$time); ?> "; ?> Сейчас в Калининграде:

                 $temp[1] °C


$yavleniya[1]
$weather_star[1]
Влажность:                       $a $vlaga[1] %
$ab davlenie:                       $a $press[1] mm rt s
Ветер:                         $d $napravleniya[1], $speed[1] м/с
Ощущается как:            $c  $temp2[1] °C
Видимость:                       $b $vid[1] км
Порывы ветра:                $windmax[1] м/с
Осадки:                            $osadki[1] мм
Время обновления: $time[1]

"; echo $vivod;?>
(.*?)<\/cloudness_str>/i',$pogoda,$yavleniya); preg_match('/(.*?)<\/humidity>/i',$pogoda,$vlaga); preg_match('/(.*?)<\/temperature>/i',$pogoda,$temp); if ($temp[1]>0) {$temp[1]='+'.$temp[1];} preg_match('/(.*?)<\/sunrise>/i',$pogoda,$img2); preg_match('/(.*?)<\/pressure>/i',$pogoda,$press); preg_match('/(.*?)<\/wind_direction_str>/i',$pogoda,$napravleniya); preg_match('/(.*?)<\/wind_speed>/i',$pogoda,$speed); preg_match('/(.*?)<\/precip>/i',$pogoda,$osadki); preg_match('/(.*?)<\/dew_point>/i',$pogoda,$temp2); preg_match('/(.*?)<\/cloudness>/i',$pogoda,$vid); preg_match('/(.*?)<\/wind_speed_max>/i',$pogoda,$windmax); preg_match('/(.*?)<\/weather_str>/i',$pogoda,$weather_star); preg_match('/(.*?)<\/local_datetime>/i',$pogoda,$time); ?>









'.$temp[1].' °C
'.$yavleniya[1].'
'.$weather_star[1].'
:



'.$yavleniya[1].'
:

'.$weather_star[1].'
:
...
:
'.$napravleniya[1].' '.$speed[1].' /
:
%
:
'.$vid[1].'
:
'.$osadki[1].' /
:
'.$windmax[1].' /
:
' .$temp2[1].' °C

:

' .$time[1].'

'; ?>
"; $b = ""; $c = ""; $d = ""; ?> Сейчас в Калининграде:

$temp[1] °C


$yavleniya[1]
$weather_star[1]
Влажность:                       $a $vlaga[1] %
Ветер:                      $d $napravleniya[1], $speed[1] м/с
Ощущается как:            $c  $temp2[1] °C
Видимость:                       $b $vid[1] км
Порывы ветра:                $windmax[1] м/с
Осадки:                            $osadki[1] мм
Время обновления: $time[1]

"; echo $vivod;?>
30) get_xml($city_id); } $xml = simplexml_load_file($data_file); // xml $city=$xml->attributes()->city; $link=$xml->attributes()->link; $city = iconv('UTF-8', 'cp1251', $city); $temp=$xml->fact->temperature; $img='image-v3'; $pic=$xml->fact->$img; $type=$xml->fact->weather_type; $type=iconv('UTF-8', 'cp1251', $type); $press=$xml->fact->pressure; $humid=$xml->fact->humidity; $weather_type_short=$xml->fact->weather_type_short; $wind=$xml->fact->wind_speed; $more=$xml->fact->water_temperature; $inf_t=$xml->informer->temperature; $wnd_dir=$xml->fact->wind_direction; if ($wnd_dir==calm)$wnd_dir=e; if ($temp>0) {$temp='+'.$temp;} if ($inf_t[0]>0) {$inf_t[0]='+'.$inf_t[0];} if ($inf_t[1]>0) {$inf_t[1]='+'.$inf_t[1];} echo '
:
' .$temp .'C
' .$weather_type_short .'
' .$inf_t[0] .'C
' .$inf_t[1] .'C
+' .$more .'C
' .$wind .' /
' .$press .'
' .$humid .' %
'; } function get_sity($city_x) { $city_id_0=26702; // id //ya_pogoda($city_id); ?>