Realtime.log for Highcharts
Posted: Sat 02 Mar 2013 8:20 am
Thanks to Mark and others for the realtime charts using Highcharts.
I am uploading on a data-limited 3g link. The 248 byte realtime.txt is no problem every minute, while a 30kb 120 minute log file is, so I'm uploading that every 15 mins at present. But user has a variable length datagap (upto 15 mins depending on the time they load the webpage).
http://www.oldlandwindmill.co.uk/newsit ... umulus.htm
Why not build the log file at the server to avoid resending the data 120 times?
I am trawling around trying to get my head around php etc, but in principle is there any reason one could not run a php script after each upload of txt, reading the last (say) 119 records in it, writing then to a tmp file, adding on the new record at the end of the log file, then closing/deleting the log file and renaming the temp file to .log??
I'm guessing there must be a reason this can't be done, because I'm sure it would be mentioned somewhere in the Forum history, and I can't find it. Or perhaps the answer is so obvious I've overlooked it. Probably the latter.
Stuart
I am uploading on a data-limited 3g link. The 248 byte realtime.txt is no problem every minute, while a 30kb 120 minute log file is, so I'm uploading that every 15 mins at present. But user has a variable length datagap (upto 15 mins depending on the time they load the webpage).
http://www.oldlandwindmill.co.uk/newsit ... umulus.htm
Why not build the log file at the server to avoid resending the data 120 times?
I am trawling around trying to get my head around php etc, but in principle is there any reason one could not run a php script after each upload of txt, reading the last (say) 119 records in it, writing then to a tmp file, adding on the new record at the end of the log file, then closing/deleting the log file and renaming the temp file to .log??
I'm guessing there must be a reason this can't be done, because I'm sure it would be mentioned somewhere in the Forum history, and I can't find it. Or perhaps the answer is so obvious I've overlooked it. Probably the latter.
Stuart