Hi All
I am looking for a small script that will read a .txt file on our server, and then display it's contents in a text box on the Home Page. The .txt file is updated every 10 minutes, it will only contain a numerical value. eg. 12
If anybody can help with this that will be great.
Thanks Cheers
morganw
$open_filei=fopen("text.txt","r"); flock($open_file, LOCK_SH); while(! feof ($open_file)) $number=fread($open_file,100000); fclose($open_file);
you have now a var $number, which contains the numbe in your file, now you can print it into the text box
And don't forget to unlock it again...
flock($open_file, 3)