Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Scripting to get and write current status of HTML report.

Status
Not open for further replies.

CGIflustered

Technical User
Feb 12, 2002
11
US
Hello,

I've got a script that let's me enter information about a report which updates every hour. I have the information saved to a HTML file (it gets written over on each entry as it should... it's used for a passdown between workshifts).

What I'm trying to do now is save with that information, the current state (at the time the info is entered about the report) of the report which updates.

How can one read the web report (it's HTML generated from an Excel spreadsheet) at the time info is submitted, and write that to a local folder? (So someone could read information that was entered at, say, 7AM, and compare it against the report which was generated at 7AM?)

So far, all I've got is opening the file, writing the link to the report, and closing the file. I need for it to actually open that link and write it locally.

Thanks in advance,
Mark
 
Mark,

Not sure I'm completely following you, but one that thought comes to mind is to use the stat (or lstat, if you're you're using symlinks) functions to determine the timestamp of the link and then write that data to another file.

Then write a second CGI that opens the DBM file (uisng tie to grab the data in a hash) and then output the data with HREF's pointing to the report files.

You could, of course, use DBI and hook the file details into a database.

Hope this helps...

-- Lance
 
Thanks Lance,

I'm a newbie to this stuff, so most of what you suggest is way over my head...

Basically, there's a report that updates every hour that charts our throughput here at work... It's a HTML document which is written by an Excel spreadsheet (linked to our work database).

Let's say at my passdown, I view the report at 7am... The report says my group did "x" number of widgets by 7AM (it's in a HTML table format)...

I've got the scripting that takes my own comments through a HTML form and overwrites an old HTML file... We use it for passdown between shifts. What I need to be able to do is add to those comments, the report status at the time I submit my passdown (so that throughout the day, one may refer back to the passdown and see what the status of things was at 7AM with a copy of the report at that point in time).

Thanks again for any help,
Mark
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top