ImportCumulusFile: Difference between revisions

no edit summary
No edit summary
{{AddOnBanner|name=ImportCumulusFile|type=PHP|author=David A Jamieson / Mark Crossley|contact='DAJ' / 'mcrossley' via the forum|updated=0501 May 2020September2020|version=4.13}}
 
This is a PHP script designed to run on your web server and will import Cumulus log files into a MySQL database table on your server.
php importcumulusfilev2-0.php file=realtime.txt type=realtime key=secretKey retainVal=7 retainUnit=day
This allows you to run the script as cron job on a Linux server, or as a scheduled task on a Windows server.
 
Version 4.3 of the script allows you to automate the generation of the monthly log file name rather than passing it as a variable.
You need to edit the following entries to enable this feature...
$auto_month = false; // True: generate from date, false: read from params
$month_file_dir= './data/'; // Directory where monthly log file is stored
 
= Version Control =
*4.3 - 1 September 2020 [[https://cumuluswiki.org/files/ImportCumulusFile_v4-3.txt Download]]
** Steinar Utne: If monthly and $auto_month=true then construct filename from date (i.e. <dir>MonYYlog.txt) rather than read from parameters
*4.2 - 18 August 2020 [[https://cumuluswiki.org/files/ImportCumulusFile_v4-2.txt Download]]
** Steinar Utne: Added Humidex in dayfile and monthly