-
HTML Help
Hey all got a bit of a Idea at work would love a wee bit of help with.
at work we use VoIP phones
there is a central text file that updates every 5 seconds that is stored on a server
that shows each every one that is logged in and what they are doing i.e on a call , on break.
I was looking to bash up a wee HTML file that i could set to refresh every 5 secs that reads this text document so i can quickly see who is doing what.
here is example of what i want to read
Login ID State AUX Reason Time Login ID Direction
123 AVAILABLE 0 1053 TotallyRandom IN
321 AUX 9 952 Jimmy OUT
How do i set a HTML to read this Text document to pull only the information i need ?
-
Re: HTML Help
If you only have HTML available then I would use javascript, there's an activex object that allows you to read a file, though I've never used this. The trouble is it sounds like what you want to do is something that would usually need to be done server side, and it would be a piece of piss to do via php or .net.
A javascript example would be (and this is totally googled, I take no credit):
Code:
<script type="text/javascript">
var activeXO = new ActiveXObject("Scripting.FileSystemObject");
var f = activeXO.OpenTextFile("c:/testing123.txt", 1);
alert(f.ReadAll());
</script>
If you were to use php there's a whole series of commands for controlling files.