www.webdeveloper.com
Results 1 to 3 of 3

Thread: Reading in text from a web site

  1. #1
    Join Date
    Aug 2007
    Location
    Michigan
    Posts
    16

    Reading in text from a web site

    I'm trying to figure out how to go about pulling text from a NOAA web site to process and post in mine. Specifically Marine MAYFOR forecasts. They are a series of numbers that give period, wind strength, wind direction, wave height, and such. Is this a job for scripts or is ther some better way to pull the plain old text from a web site into a varible that I can parse?

    Thanks

    SAMPLE:
    FZUS63 KDTX 211343
    GLFLH
    OPEN LAKE FORECAST FOR LAKE HURON
    NATIONAL WEATHER SERVICE DETROIT/PONTIAC MI
    943 AM EDT MON MAY 21 2012
    FOR WATERS BEYOND FIVE NAUTICAL MILES OF SHORE ON LAKE HURON

    SYNOPSIS
    LOW PRESSURE...29.90 INCHES...WILL MOVE THROUGH THE
    REGION TODAY...PULLING A COLD FRONT ALONG WITH IT. HIGH PRESSURE
    WILL THEN REBUILD OVER THE AREA BY TUESDAY AND LAST THROUGH THE
    MID WEEK PERIOD.
    LHZ461-212015-
    MAFOR 2115/
    HURON NORTH 12710 13720 12820 11810. A CHANCE OF SHOWERS AND
    THUNDERSTORMS THIS AFTERNOON. A CHANCE OF SHOWERS AND THUNDERSTORMS
    LATE. WAVES 1 TO 3 FEET THIS AFTERNOON. WAVES 1 TO 3 FEET
    BUILDING TO 3 TO 5 FEET OVERNIGHT WITH MAXIMUM WAVE HEIGHT AROUND
    7 FEET TONIGHT. WAVES 3 TO 5 FEET SUBSIDING TO 2 TO 4 FEET WITH
    MAXIMUM WAVE HEIGHT AROUND 7 FEET TUESDAY MORNING. 220103.
    HURON SOUTH 11500 11600 13810 11720 11820 11810. A CHANCE OF
    SHOWERS AND THUNDERSTORMS THIS AFTERNOON. A CHANCE OF SHOWERS AND
    THUNDERSTORMS TONIGHT. WAVES 1 TO 3 FEET THIS AFTERNOON. WAVES 2
    FEET OR LESS BUILDING TO 3 TO 5 FEET OVERNIGHT WITH MAXIMUM WAVE
    HEIGHT AROUND 7 FEET TONIGHT. WAVES 4 TO 6 FEET SUBSIDING TO 3 TO
    5 FEET WITH MAXIMUM WAVE HEIGHT AROUND 8 FEET TUESDAY MORNING.
    220103.

    BT
    WAVES ARE THE SIGNIFICANT WAVE HEIGHT - THE AVERAGE OF THE HIGHEST
    1/3 OF THE WAVE SPECTRUM. MAXIMUM WAVE HEIGHT IS THE HIGHEST 1/20
    WAVE HEIGHT.
    EXPERIMENTAL GRAPHICAL MARINE FORECASTS ARE AVAILABLE ONLINE AT
    WEATHER.GOV/DETROIT (ALL LOWER CASE)

  2. #2
    Join Date
    Feb 2005
    Posts
    345
    use the site´s rss feed (e.g. http://www.nws.noaa.gov/rss/) and display it on your site via a php rss parser like http://www.simplepie.org/

  3. #3
    Join Date
    Aug 2007
    Location
    Michigan
    Posts
    16
    Thanks but the pages I am after are not listed as a RSS feed. If they are our goverment sure has done a good job of hiding them.

    Heck I can copy and paste it with no problem, just need to grab it somehow.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles