[KOD] kolay hava durumu
Tarih: 10.07.2006, 15:13
Biraz phpbb de çalışalım, yapabildiğimin en hızlısı bu, döngü haline çevrilip phpbb standırdına oturtulabilir:
- Kod: Tümünü seç
[ AÇ ]
includes/page_header.php
[ BUL ]
// Format Timezone. We are unable to use array_pop here, because of PHP3 compatibility
[ ÖNCESİNE EKLE ]
/**
* returns weather information for Ankara, Istanbul, Izmir
* fetch weather images from meteor.gov.tr
*/
function get_weather_data() {
$cities = array(
'ANKARA' => 'http://www.meteor.gov.tr/2003/iller/set7/ankara1.aspx',
'İSTANBUL' => 'http://www.meteor.gov.tr/2003/iller/set7/istanbul1.aspx',
'İZMİR' => 'http://www.meteor.gov.tr/2003/iller/set7/izmir1.aspx',
);
$output .= '<br /><table id="weather" class="genmed"><tr>';
foreach ($cities as $city=>$address) {
if (@fopen($address,"r")) {
$output .= "<td align='center'>$city<br /><img src='$address' vspace='4' alt='$city' title='$city' border=0></td>";
}
}
$output .= '</tr></table>';
return $output;
}
[ BUL ]
'PRIVMSG_IMG' => $icon_pm,
[ ÖNCESİNE EKLE ]
'HAVA_DURUM' => get_weather_data(),
[ AÇ ]
templates/subSilver/istediğin_tpl_dosyası.tpl
[ EKLE ] istediğin yere ekle
{HAVA_DURUM}
[ BİTTİ ]