Author Topic: Weather.com 10-day Forecast Text-RSS format  (Read 3697 times)

uk_skinner

  • Global Moderator
  • TodayPlus Veteran
  • *****
  • Posts: 1313
Weather.com 10-day Forecast Text-RSS format
« on: March 02, 2005, 09:56:19 PM »
Here is the PHP that you can have RSS feed from weather.com 10-day forecast text.  I did not see other language forecast text from other weather.com sites (such as de.weather.com).  So this is English text.

url:
http://www.tpfans.com/rss/weathertext.php?Citycode=USMD0347
Code: [Select]

<?xml version='1.0' encoding='utf-8' ?>
<rss version="0.91">
<channel>
  <title>Weather.com Forecast</title>
  <description>Detailed Forecast from Weather.com</description>
  <link>http://www.weather.com/</link>
<item>
<title> Forecast for Tonight  02 Mar 2005</title>
<link>http://www.weather.com/activities/other/other/weather/daily-narrative.html?locid=USMD0347USMD0347</link>
<description>Partly cloudy skies with gusty winds. A few flurries or snow showers possible.  Low 22F. Winds WNW at 20 to 30 mph.</description>
</item>
<item>
<title> Forecast for Tomorrow  03 Mar 2005</title>
<link>http://www.weather.com/activities/other/other/weather/daily-narrative.html?locid=USMD0347USMD0347</link>
<description>Partly cloudy skies with gusty winds. High 38F. Winds NW at 20 to 30 mph.</description>
</item>
<item>
<title> Forecast for Tomorrow night  03 Mar 2005</title>
<link>http://www.weather.com/activities/other/other/weather/daily-narrative.html?locid=USMD0347USMD0347</link>
<description>A mostly clear sky. Low 21F. Winds WNW at 5 to 10 mph.</description>
</item>
<item>
<title> Forecast for Friday  04 Mar 2005</title>
<link>http://www.weather.com/activities/other/other/weather/daily-narrative.html?locid=USMD0347USMD0347</link>
<description>Plenty of sun. Highs in the low 40s and lows in the low 30s.</description>
</item>
<item>
<title> Forecast for Saturday  05 Mar 2005</title>
<link>http://www.weather.com/activities/other/other/weather/daily-narrative.html?locid=USMD0347USMD0347</link>
<description>Few showers. Highs in the upper 40s and lows in the upper 20s.</description>
</item>
<item>
<title> Forecast for Sunday  06 Mar 2005</title>
<link>http://www.weather.com/activities/other/other/weather/daily-narrative.html?locid=USMD0347USMD0347</link>
<description>Partly cloudy. Highs in the low 40s and lows in the upper 20s.</description>
</item>
<item>
<title> Forecast for Monday  07 Mar 2005</title>
<link>http://www.weather.com/activities/other/other/weather/daily-narrative.html?locid=USMD0347USMD0347</link>
<description>Considerable cloudiness. Highs in the low 50s and lows in the upper 30s.</description>
</item>
<item>
<title> Forecast for Tuesday  08 Mar 2005</title>
<link>http://www.weather.com/activities/other/other/weather/daily-narrative.html?locid=USMD0347USMD0347</link>
<description>Showers. Highs in the low 50s and lows in the low 30s.</description>
</item>
<item>
<title> Forecast for Wednesday  09 Mar 2005</title>
<link>http://www.weather.com/activities/other/other/weather/daily-narrative.html?locid=USMD0347USMD0347</link>
<description>Times of sun and clouds. Highs in the mid 40s and lows in the mid 20s.</description>
</item>
<item>
<title> Forecast for Thursday  10 Mar 2005</title>
<link>http://www.weather.com/activities/other/other/weather/daily-narrative.html?locid=USMD0347USMD0347</link>
<description>Mix of sun and clouds. Highs in the low 40s and lows in the upper 20s.</description>
</item>
  </channel>
</rss>

ZapMe1

  • TodayPlus Veteran
  • *****
  • Posts: 551
Weather.com 10-day Forecast Text-RSS format
« Reply #1 on: March 27, 2005, 06:37:40 PM »
Request !! (If Possible)  :!:

Is there any way to eliminate the words   "Forecast for"  from the rss titles ??

Instead of "Forecast for Tonight 27 Mar 2005"

Could it read "Tonight 27 Mar 2005"

I'm not using the whole width of the screen for my rss, and this would save valuable space !!  :wink:
ZapMe1

"The most knowledgable person in the world is not the one who possesses the most knowledge, but the one who surrounds themselves with the greatest number of knowledgable people"

uk_skinner

  • Global Moderator
  • TodayPlus Veteran
  • *****
  • Posts: 1313
Weather.com 10-day Forecast Text-RSS format
« Reply #2 on: March 27, 2005, 09:29:15 PM »
Quote from: "ZapMe1"
Request !! (If Possible)  :!:

Is there any way to eliminate the words   "Forecast for"  from the rss titles ??

Instead of "Forecast for Tonight 27 Mar 2005"

Could it read "Tonight 27 Mar 2005"

I'm not using the whole width of the screen for my rss, and this would save valuable space !!  :wink:


Done..

ZapMe1

  • TodayPlus Veteran
  • *****
  • Posts: 551
Weather.com 10-day Forecast Text-RSS format
« Reply #3 on: March 27, 2005, 09:38:18 PM »
  Thank You !!!!!!
ZapMe1

"The most knowledgable person in the world is not the one who possesses the most knowledge, but the one who surrounds themselves with the greatest number of knowledgable people"

uk_skinner

  • Global Moderator
  • TodayPlus Veteran
  • *****
  • Posts: 1313
Weather.com 10-day Forecast Text-RSS format
« Reply #4 on: April 01, 2005, 05:17:09 PM »
As ZapMe1 requested, One parameter was added to the url.

http://tpfans.com/rss/weathertext.php?Citycode=USOH0092&Abv=y

Abv:  The "day" will be displayed a "shorten" form.  

Code: [Select]
<?xml version='1.0' encoding='utf-8' ?>
<rss version="0.91">
<channel>
  <title>Weather.com Forecast for Blacklick OH</title>
  <description>Detailed Forecast from Weather.com</description>
  <link>http://www.weather.com/</link>
<item>
<title>Tonight  01 Apr 2005</title>
<link>http://www.weather.com/activities/other/other/weather/daily-narrative.html?locid=USOH0092</link>
<description>Windy with rain likely. Low 41F. Winds NNE at 20 to 30 mph. Rainfall possibly over one inch.</description>
</item>
<item>
<title>Tomrw  02 Apr 2005</title>
<link>http://www.weather.com/activities/other/other/weather/daily-narrative.html?locid=USOH0092</link>
<description>Windy with rain likely. High 43F. Winds NNW at 25 to 35 mph. Chance of rain 90%. Rainfall near a half an inch.</description>
</item>
<item>
<title>Tomrw night  02 Apr 2005</title>
<link>http://www.weather.com/activities/other/other/weather/daily-narrative.html?locid=USOH0092</link>
<description>Windy with rain and snow showers in the evening tapering to snow showers late. Low 32F. Winds NW at 25 to 35 mph. Chance of precip 80%. A slushy accumulation less than one inch. Winds could occasionally gust over 40 mph.</description>
</item>
<item>
<title>Sun  03 Apr 2005</title>
<link>http://www.weather.com/activities/other/other/weather/daily-narrative.html?locid=USOH0092</link>
<description>Windy with times of sun and clouds. Highs in the low 50s and lows in the low 40s.</description>
</item>
<item>
<title>Mon  04 Apr 2005</title>
<link>http://www.weather.com/activities/other/other/weather/daily-narrative.html?locid=USOH0092</link>
<description>Clouds giving way to sun . Highs in the low 60s and lows in the mid 40s.</description>
</item>
<item>
<title>Tue  05 Apr 2005</title>
<link>http://www.weather.com/activities/other/other/weather/daily-narrative.html?locid=USOH0092</link>
<description>Partly cloudy. Highs in the mid 60s and lows in the low 50s.</description>
</item>
<item>
<title>Wed  06 Apr 2005</title>
<link>http://www.weather.com/activities/other/other/weather/daily-narrative.html?locid=USOH0092</link>
<description>Isolated thunderstorms. Highs in the low 60s and lows in the low 40s.</description>
</item>
<item>
<title>Thu  07 Apr 2005</title>
<link>http://www.weather.com/activities/other/other/weather/daily-narrative.html?locid=USOH0092</link>
<description>Showers. Highs in the mid 50s and lows in the upper 30s.</description>
</item>
<item>
<title>Fri  08 Apr 2005</title>
<link>http://www.weather.com/activities/other/other/weather/daily-narrative.html?locid=USOH0092</link>
<description>Times of sun and clouds. Highs in the upper 50s and lows in the low 40s.</description>
</item>
<item>
<title>Sat  09 Apr 2005</title>
<link>http://www.weather.com/activities/other/other/weather/daily-narrative.html?locid=USOH0092</link>
<description>Partly cloudy. Highs in the mid 50s and lows in the low 40s.</description>
</item>
  </channel>
</rss>

ZapMe1

  • TodayPlus Veteran
  • *****
  • Posts: 551
Weather.com 10-day Forecast Text-RSS format
« Reply #5 on: April 01, 2005, 05:21:12 PM »
Very Cool !!

Thank You Again !!!  :D
ZapMe1

"The most knowledgable person in the world is not the one who possesses the most knowledge, but the one who surrounds themselves with the greatest number of knowledgable people"