Almost there! At least for checking or updating NWS Alerts. I added the two extra files you created (index2.php and cron_job.php) and they do provide some info. I did make minor spelling corrections and added a bit of text to verify which file was out putting the text.
Running the http://www.mailscamalert/weather2/index2.php?mu=1 gives me this and nothing else on a blank page:Success, time spent in seconds: 0.744896888733
That seems correct.
Running http://www.mailscamalert/weather2/cron_job.php?mu=1 shows the following and nothing else on a blank page:Success (from running cron_job.php), time spent in seconds: 0.929280996323
Notice: Undefined variable: save_nws_filename in /home3/xairbus2/public_html/weather2/cron_job.php on line 29
Notice: Undefined variable: save_nws_filemtime in /home3/xairbus2/public_html/weather2/cron_job.php on line 30
Notice: Undefined variable: save_nws_updateTime in /home3/xairbus2/public_html/weather2/cron_job.php on line 35
Notice: Undefined variable: save_nws_filename in /home3/xairbus2/public_html/weather2/cron_job.php on line 37 [banghead]
No change in settings (updatetime = ) filetime : Dec 31 1969 6:00 pm
I could add a bit of code to eliminate the "Undefined variables" notices by uncommenting the code.line 19 #$save_nws_filename = $save_nws_filemtime = $save_nws_updateTime = "";
However, it will still output the same ?bogus? date (Dec 31 1969 6:00 pm) and the $save_nws_updateTime value is still set to nothing.
I'm sure I'm doing something simply stupid. Or else the NWS sets the date for all expired Alerts to Dec 31 1969 6:00 pm.
Almost there! At least for checking or updating NWS Alerts. I added the two extra files you created (index2.php and cron_job.php) and they do provide some info. I did make minor spelling corrections and added a bit of text to verify which file was out putting the text.
Running the http://www.mailscamalert/weather2/index2.php?mu=1 gives me this and nothing else on a blank page:Success, time spent in seconds: 0.744896888733
That seems correct.
Running http://www.mailscamalert/weather2/cron_job.php?mu=1 shows the following and nothing else on a blank page:Success (from running cron_job.php), time spent in seconds: 0.929280996323
. . . shortened . . .
So the index2.php should be used then for now if you already found a solution for you cron.
I tried to get the data-times of the new nws files, but that was no succes then
.
I will tomorrorw in my daytime check why that script does not work.
===
The blank page is on purpose.
Most cron servers only allow a small message not a whole page. So all normal output is removed, only the essential information is returned, as in index2.php
===
But all of this is not that important.
But this is: For the moment, if you DID NOT find a cron-server, please change back the $nocron setting so that the warnings are retrieved as long as you have no cron server/program.
Wim