First, I would like to thank eemond who opened my eyes to the PHP script. He was also kindly enough to share with me his script. Without his help, these PHP scripts could not be here. Also I would like to express my gratitude to users to help me testing them, broesel, thc, ZapMe1, Geezer, Timmy, Wichtel and also Jim for hosting this forum.
There are 3 PHP scripts and almost identical. The German and French ones pull the information from their weather.com (de.weather and fr.weather). Both of them have been passed to the their own sites and will be testing there. The one I posted here will pull all the information from weather.com. In other words, if you can find the information from this site then you can generate the city.txt
This was considered as public testing and was trying to find out any error in it. Once it is stable, its final resident site will be discussed.
Before go to the details, just a general warning: Please back up your PPC before doing any thing.
The link is:
http://72.9.224.178/~tpfansc/rss/weather.php?Citycode=GMXX0039&SFDay=1&Language=GMI would suggest you copy/paste this link into your browser and test it. Here are the parameters:
Citycode: It is required. One of error checking mechanism was in the script. If you put an invalid Citycode, it will generate an “Error” city.txt. No information will be in there and “Error!!!” will be in the this.swConText. In that way, you will see “Error” in the TP.
SFDay: Optional. Start Forecast Day (SFDay) allow you to set the first day of the 5-day forecast. If you don’t specify it, the default value is “0” (today). If you set “SFDay=1” then your 5-day forecast will start at tomorrow.
Language: Optional. This will allow you translate the forecast text of current condition into either German (GM), French (FR) or Dutch (NL). If other language is desired, please post the forecasttext.txt here and I can try to put them in. Due to the different forecast format used in MSNBC and weather.com, sometimes the PHP could not find the right matched word. It will take some times to make it perfect.
To let this new generate city.txt can be used in TP, we need to use radar.exe to download it. I guess all the talent skinner here will work out a way to do it. Here are some trick issues need to be lay out first.
1) At this point, there are time file also are generated when TP update the weather and RSS. There are two numbers in the file. I would like to ask some help to figure out what these two numbers are. They are important because this file is where TP get latest update time from. Before figure out a way to generate this time file by ourselves, we still need TP to run the update from MSNBC. It means twice downloading.
2) As mentioned above, the MSNBC updating is still needed to generate the time file, a delay updating from weather.com is necessary. I have a TpExeDelay.exe to do this job. It will launch programs from a list after TP finishing its own updating. If you have other program on the list, it is necessary to put radar.exe run first since it will download the city.txt.
I was hoping later we can have these process more simple and effectively. But at the early stage of this development, a little bit patience is required.