English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I have a file on a server named out.txt, and to put it simply I need a way to send the data in the file to an email when the data changes.

Really I just need a way to keep updated on a file without actually visiting it, another solution would be to have a text field which drew its text from the out.txt so the data would be on a webpage.

I have no clue how to do this its the last this I need to do to finish a site that has taken a while to build, Any help would be aprreitiated.

2007-01-18 13:26:51 · 1 answers · asked by Crayola 3 in Computers & Internet Other - Computers

1 answers

You want RSS. Use "out.txt" as your RSS file, then point an RSS reader at it. When it changes, the RSS reader will know this and display a link to out.txt for you (or whoever needs to monitor it) to read it.

...I hadn't thought about using RSS as a way to notify me when a long batch process was done, but this is kewl. Add a final script that outputs something to "out.txt" and keep an RSS reader open, and it'll ping me when the batch is done. I like this! :-)

You can use pretty much any HTML formatting inside your RSS file, including tags, links, images etc.

See the Tutorial in the Sources field for more information on how to structure an RSS file. It's really pretty simple, you just need to stick in the XML tags and put your text output in the middle part of it. I assume you have some kind of control over what gets put into out.txt, like it's the output of a Perl script or something. If not, then pipe your output to a script that puts in the standardized header/footer/tag information.

Now... you CAN make an RSS file appear in a Web page. I've done this, but I used some Javascript from a source that has dried up over the past year, and because it was server-side Javascript I don't have access to it. But a little time with Google (sorry, Yahoo pals) was all it took for me to find it when I had to prototype this a year ago. It was slick. You'll like it too.

2007-01-18 13:36:13 · answer #1 · answered by Scott F 5 · 0 0

fedest.com, questions and answers