There are too many bugs in weather1.26(or weathercenter etc.)The following suggest maybe useful:
NOTE:
1, modify the pnuserapi.php from line 657 to line 702:
fputs($fa,"GET /m/chnk/d/weather_d_src.asp?acid=$accid HTTP/1.0\r\nHost: www.msnbc.com\r\n\r\n");
$answer = fgets($fa,128);
$v_City = "";
$v_SubDiv = "";
$v_Country = "";
$v_Region = "";
$v_Temp = "";
$v_TempCel = "";
$v_CIcon = "";
$v_WindS = "";
$v_WindD = "";
$v_Baro = "";
$v_Humid = "";
$v_Real = "";
$v_UV = "";
$v_Vis = "";
$v_LastUp = "";
$v_ConText = "";
$v_Fore = "";
$v_Acid = "";
while (!feof($fa)) {
$grabline = fgets($fa, 4096);
$grabline= trim($grabline) . "\n";
if (substr($grabline,7,4) == "City") { $v_City = substr($grabline,15,20); }
if (substr($grabline,7,6) == "SubDiv") { $v_SubDiv = substr($grabline,17,20); }
if (substr($grabline,7,7) == "Country") { $v_Country = substr($grabline,18,20); }
if (substr($grabline,7,6) == "Region") { $v_Region = substr($grabline,17,20); }
if (substr($grabline,7,5) == "Temp ") { $v_Temp = substr($grabline,15,20); }
if (substr($grabline,7,7) == "TempCel") { $v_TempCel = substr($grabline,18,60); }
if (substr($grabline,7,5) == "CIcon") { $v_CIcon = substr($grabline,16,20); }
if (substr($grabline,7,5) == "WindS") { $v_WindS = substr($grabline,16,20); }
if (substr($grabline,7,5) == "WindD") { $v_WindD = substr($grabline,16,20); }
if (substr($grabline,7,4) == "Baro") { $v_Baro = substr($grabline,15,20); }
if (substr($grabline,7,5) == "Humid") { $v_Humid = substr($grabline,16,20); }
if (substr($grabline,7,4) == "Real") { $v_Real = substr($grabline,15,20); }
if (substr($grabline,7,2) == "UV") { $v_UV = substr($grabline,13,20); }
if (substr($grabline,7,3) == "Vis") { $v_Vis = substr($grabline,14,20); }
if (substr($grabline,7,6) == "LastUp") { $v_LastUp = substr($grabline,17,20); }
if (substr($grabline,7,7) == "ConText") { $v_ConText = substr($grabline,18,40); }
if (substr($grabline,7,4) == "Fore") { $v_Fore = substr($grabline,15,200); }
if (substr($grabline,7,4) == "Acid") { $v_Acid = substr($grabline,15,12); }
}
2, modify line 645:
$cache_time_rnd = 300 - rand(0, 7200);
with this setting you can change cache time to 15000.and adjust the block
reflesh time to three hours.
3, get the new msnbc citycode with this code:
--
modules&blocks downloads
- shyra posted »MenuTree Mystery« 19:50h
- dks answered »include a file« 18:22h
- dks answered ».764 -> 1.1.1, Can't add new blocks« 17:33h
- craigh posted »PostCalendar 5.5.0RC1 needs testers and translators« 17:24h
- bartl answered »Upgrading 1.0.2 --> 1.1.1« 15:02h
- Charlie-otb answered »SafeHTML output filter and youtube« 10:02h
- dl7und answered »Adding an "About Us" page« 03:34h
