in reply to Help with LWP::Simple
I'd like to be able to trust headers, but I've been burned by this kind of thing too many times.
Set up a cron job to get the file every minute, through LWP::Simple or anything else, really. (wget, whatever) Bring the file down under some name other than what it's real time, though. (E.g. append a "testing-" in front of it.) Then, "diff" it against a "baseline copy" of the most recently obtained version of the file of the same name. If the files differ, then your newly-obtained version can be used as the "current" file, and you can archive the old one. If the files are the same, delete the "testing-" version. Try again the next minute.
Something to beware of: If you file really is changing on a minute to minute basis and you're trying to get this file via HTTP, then you will lose out on this file at some point in time. Servers go down, networks get hosed, things fall apart, the centre will not hold, etc. Please factor this into your plans.
Cheers,
Richard
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: LWP::Simple
by Anonymous Monk on Mar 26, 2002 at 05:50 UTC | |
by zengargoyle (Deacon) on Mar 26, 2002 at 06:24 UTC |