I hope someone can help me with this because I'm stumped. I've written a script witch basically recreates "tail -f" for *nix and allows you to watch a file from a webpage in realtime (well with atmost a 5 sec delay). The problem I'm having is that I'm using a while loop to keep checking the file for modifications untill the connetion is aborted - therefore making it a endless loop. This means that the closing tags of the html page are never written because the page never fully loads. So I was wondering if there is a way around this or a better way to do it? Is it possible to write the closing tags and then come back to while loop and keep writing data in a previous spot on the page?
my script is kind of long to post so if have the time to check it out you can get it from: http://216.147.67.63/Downloads/Files/PHPTail.php.gz
Thanks
No, it's not possible the way you describe it. The only way to do it would be with some fancy JavaScript, Frames, or ditch all of your closing tags (and the opening tags that require them).
hmm, i sort of figured that...I guess I won't worry about the closing tags..at the moment everything works fine in IE.
Why not close the page but include a <META http-equiv="REFRESH" content="0; URL=THISPAGE.php">
and have the inclusion of this be in some sort of if, so when you want to stop refreshing, the meta won't be posted.
well,I've thought about that, but that doesn't really give the same effect. Using the meta refresh won't give me the realtime trail of a file that i want.