Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 01-08-2007, 02:52 PM
itsalltropical itsalltropical is offline
 
Join Date: Dec 2006
Posts: 16
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default RSS rdb file format parse into DB table; use vBAdvanced and/or AboutToday to display

Need to input the following RSS feed which is in rdb format, hopefully into a database table in vBulletin. Then create a module to display the latest reading on my cmps_index page and maybe at the bottom of all my pages. I am a newbie so I understand the concept; just don't know how to start & finish

I would need step by step instructions since I am so green, i.e
Go to adminCP or MySQL to create table, etc.
Use this code to load table;
Go to cmps and add module, etc.
Use RSS or AboutToday or this code to go get the data every hour or maybe just twice a day.

There are comment lines before the data that start with #. The first row of the data defines the columns. After that is the real data. I would want to load rows into the database that are unique by Date & Time. Each read is usually an hour apart. Then, again my module would display the latest reading with Date, Time and Level.

Here is a paste of the data coming in. URL is: USGS Level @ Lake Murray, SC I don't know how to make this box bigger Maybe a Moderator/Member would teach a newbie how? PM is OK.


PHP Code:
# ---------------------------------- 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.# Additional info: http://waterdata.usgs.gov/sc/nwis/help/?provisional## File-format description: http://waterdata.usgs.gov/nwis/?tab_delimited_format_info# Automated-retrieval info: http://waterdata.usgs.gov/nwis/?automated_retrieval_info## Contact: gs-w_support_nwisweb@usgs.gov# retrieved: 2007-01-08 11:21:12 EST## Data for the following site(s) are contained in this file# USGS 02168500 LAKE MURRAY NEAR COLUMBIA, SC# -----------------------------------------------------------------------------------## Data provided for site 02168500# DD parameter Description# 13 00065 Gage height, feet#agency_cd    site_no    datetime    13_00065    13_00065_cd5s    15s    16s    14s    14sUSGS    02168500    2007-01-07 00:00    357.00    USGS    02168500    2007-01-07 01:00    356.98    USGS    02168500    2007-01-07 02:00    357.00    USGS    02168500    2007-01-07 03:00    357.01    USGS    02168500    2007-01-07 04:00    357.02    USGS    02168500    2007-01-07 05:00    357.02    USGS    02168500    2007-01-07 06:00    357.03    USGS    02168500    2007-01-07 07:00    357.06    USGS    02168500    2007-01-07 08:00    357.04    USGS    02168500    2007-01-07 09:00    357.06    USGS    02168500    2007-01-07 10:00    357.07    USGS    02168500    2007-01-07 11:00    357.09    USGS    02168500    2007-01-07 12:00    357.07    USGS    02168500    2007-01-07 13:00    357.11    USGS    02168500    2007-01-07 14:00    357.13    USGS    02168500    2007-01-07 15:00    357.12    USGS    02168500    2007-01-07 16:00    357.13    USGS    02168500    2007-01-07 17:00    357.15    USGS    02168500    2007-01-07 18:00    357.16    USGS    02168500    2007-01-07 19:00    357.16    USGS    02168500    2007-01-07 20:00    357.18    USGS    02168500    2007-01-07 21:00    357.20    USGS    02168500    2007-01-07 22:00    357.21    USGS    02168500    2007-01-07 23:00    357.23    USGS    02168500    2007-01-08 00:00    357.22    USGS    02168500    2007-01-08 01:00    357.25    USGS    02168500    2007-01-08 02:00    357.23    USGS    02168500    2007-01-08 03:00    357.24    USGS    02168500    2007-01-08 04:00    357.29    USGS    02168500    2007-01-08 05:00    357.29    USGS    02168500    2007-01-08 06:00    357.34    USGS    02168500    2007-01-08 07:00    357.36    USGS    02168500    2007-01-08 08:00    357.38 
Reply With Quote
  #2  
Old 01-09-2007, 10:55 PM
itsalltropical itsalltropical is offline
 
Join Date: Dec 2006
Posts: 16
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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 
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 06:57 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.03444 seconds
  • Memory Usage 2,196KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (2)post_thanks_box
  • (2)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (2)post_thanks_postbit_info
  • (2)postbit
  • (2)postbit_onlinestatus
  • (2)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete