I've got the data down to three lines after the comments which start with a #. I just need the last line of data which has date, time and level. For some reason when I put the data within the php tags it is wrapping the last line. Can anyone help me?
At this point I'll even take just pulling the last line of data and displaying it within some text like "Lake Murray Level @ xxx on date time". Whatever is easiest. Display it, create a post in News forum, etc.
Here's the new URL with the reduced amount of data. I just need to post date time level (which in the example below is 357.30. Would like to automagically pull it twice a day.
USGS Lake Murray
PHP Code:
#
# U.S. Geological Survey
# National Water Information System
# Retrieved: 2007-01-09 19:37:20 EST
#
# ---------------------WARNING---------------------
# The data you have obtained from this automated
# U.S. Geological Survey database have not received
# Director's approval and as such are provisional
# and subject to revision. The data are released
# on the condition that neither the USGS nor the
# United States Government may be held liable for
# any damages resulting from its use.
#
# Further Descriptions of the parameter_cd column can be found at:
# http://waterdata.usgs.gov/nwis/pmcodes
# Further Descriptions of codes in the result_va column can be found at:
# http://waterdata.usgs.gov/nwis/help?codes_help
#
# This information includes the following fields:
#
# agency_cd Agency Code
# station_nm Station Name
# site_no USGS station number
# dd_nu Data Descriptor Number
# parameter_cd Parameter Code
# result_dt Date that the result was taken
# result va Current value
# result_cd Code to show data quality
# result_md Date the result was modified in the NWIS database
#
agency_cd site_no dd_nu parameter_cd result_dt result_va result_cd result_md
5s 15s 2n 5s 12d 12s 2s 12d
USGS 02168500 13 00065 2007-01-09 16:00:00 357.30