Very nice, Ryan (I love weather scripts). Here's a modification of your
script to make it web-ready. See it in action doing the Asheville, NC
weather at:

http://nuoj.com/cgi-bin/weather-forecast.r

and below is the script itself (mostly Ryan's work, give him all the
credit<g>):


#!/rebol/rebol --cgi
REBOL []

print "Content-Type: text/html^/"

ZIP: 28806   ;;; put in your own zip code

forecast: func [
    ZIP [integer!] {The ZIP code for where you want the forecast}
    /local weather-URL weather-info future-weather
][
    weather-URL: make url! rejoin
[{http://www.accuweather.com/adcbin/local_index?thisZip=} ZIP {&nav=home}]
    weather-info: read weather-URL
    parse/all weather-info [thru "^/." copy text to "$$" (future-weather:
copy text)]
    print future-weather  ;; added print function
]

print "<h2>Weather for Asheville, North Carolina</h2><br>"

forecast ZIP

-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.

Reply via email to