Andy T <andy.RemoveThis@westmidland-internet.co.uk> wrote:
> Hi
>
> I would like to show a real time updated text file on a web site.
>
> The way I wish to do this is to create my web page and insert the
> content as a text file that is writable on the fly by a CGI script.
> That part I can do but getting the text file embedded is proving hard
> for me. being a bit thick
Don't know if this will help you or not, as it's been awhile since I'd messed
with it (and then it wouldn't work with IE, it was a netscape extension so
it's probably useless)
Anyhow.. google for "server push" it involved sending the HTTP response
as a multi-part mime message. Wouldn't recommend it for anything serious
though, (even if it did work for you, the server process needs to hang
around feeding it data, this is a serious problem if you had 50 visitors
or more reading the same page, but it's OK for viewing log files on some
server some place as an admin function)
The other thing to google for is "Refresh" or "server pull" you might be
able to set it up (using an [i]frame or whole new page) that refreshes every
few seconds not real-time, but pretty close. This is slightly better if
you had more visitors because you can set the refresh rate. (Hint: if
the log hasn't changed since the last refresh, you should send the HTTP
response code for "no content")
Those are the 2 ideas I have, hopefully someone will have something better.
Jamie
--
<a style='text-decoration: underline;' href="http://www.geniegate.com" target="_blank">http://www.geniegate.com</a> Custom web programming
guhzo_42.RemoveThis@lnubb.pbz (rot13) User Management Solutions<!-- ~MESSAGE_AFTER~ -->
>> Stay informed about: text file embedded in html page