Help - Search - Members - Calendar
Full Version: displaying data from a text file on a web page
HTMLHelp Forums > Web Authoring > Web Site Functionality
eriesurfer
i want to read data from a noaa weather buoy (stored in a txt file) that is updated hourly and would like to display it in a graphical or textual form on my personal website.

here is a link to the file

http://www.ndbc.noaa.gov/data/hourly2/hour_00.txt


thanks
Christian J
You might include the file's content with e.g. PHP, ASP or some other server-side program. This will also let you edit the data in various ways.
eriesurfer
QUOTE(Christian J @ Dec 7 2006, 09:36 AM) *

You might include the file's content with e.g. PHP, ASP or some other server-side program. This will also let you edit the data in various ways.

and how do i do this?
jimlongo
You can look here for starters http://htmlhelp.com/faq/cgifaq.html
Christian J
QUOTE(eriesurfer @ Dec 14 2006, 03:29 AM) *

QUOTE(Christian J @ Dec 7 2006, 09:36 AM) *

You might include the file's content with e.g. PHP, ASP or some other server-side program. This will also let you edit the data in various ways.

and how do i do this?

Depends on what your web host offers. With PHP you might use http://se.php.net/function.file-get-contents (but not all web hosts may allow reading content from other domains). From there on it depends on how you want to display it, this may or may not be complicated.

You may also load the text file in an inline frame, possibly also edit it with client-side javascript from there (again I'm not sure if JS allows this from another domain).
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.