Page 1 of 1

buoy-data.php V1.19 released .. use curl/https for www.ndbc.noaa.gov data

Posted: Wed 27 Jun 2018 3:54 pm
by saratogaWX
Looks like www.ndbc.noaa.gov switched to mandatory https access, and the V1.18 script was http-only.

The V1.19 script now uses curl for the access via https and has a couple of minor fixes for PHP7+

Download from the script page

Thanks to Bob from http://www.ka5zci.com/ for the heads-up!

Best regards,
Ken

Re: buoy-data.php V1.19 released .. use curl/https for www.ndbc.noaa.gov data

Posted: Wed 27 Jun 2018 8:58 pm
by ConligWX
Thanks Ken for the Update. I must get round to renewing the UK map with a new one as many of the bouys and oil/gas platforms in the North Sea are now shut down. I had started it about a year ago, but the project was low priority.

Re: buoy-data.php V1.19 released .. use curl/https for www.ndbc.noaa.gov data

Posted: Mon 02 Jul 2018 9:21 am
by ConligWX
Ken

I have just checked my Apache Error logs and it is full (100's) of these type of entries:

Code: Select all

[Wed Jun 27 21:51:41.568967 2018] [php7:notice] [pid 30454:tid 140246979712768] [client x.x.x.x:50472] PHP Notice:  Undefined offset: 0 in /share/htdocs/weather/buoy-data.php on line 355
[Wed Jun 27 21:52:42.635538 2018] [php7:notice] [pid 28803:tid 140670040332032] [client x.x.x.x:50542] PHP Notice:  Undefined offset: 1 in /share/htdocs/weather/buoy-data.php on line 1119
[Wed Jun 27 21:52:42.635599 2018] [php7:notice] [pid 28803:tid 140670040332032] [client x.x.x.x:50542] PHP Notice:  Undefined offset: 2 in /share/htdocs/weather/buoy-data.php on line 1119
[Wed Jun 27 21:52:42.635623 2018] [php7:notice] [pid 28803:tid 140670040332032] [client x.x.x.x:50542] PHP Notice:  Undefined offset: 3 in /share/htdocs/weather/buoy-data.php on line 1119
is this an error or just a warning that can be ignored?

also line 861

Code: Select all

 global $seenBuoy,$Buoys,$Units,$NDBCURL,$myUOM,$table,$scroller,$CSS,$skipNoData,$windArrowDir,$showNoData,$windArrowSize;
;
2 semi-colons one after another, is that correct?

Re: buoy-data.php V1.19 released .. use curl/https for www.ndbc.noaa.gov data

Posted: Tue 03 Jul 2018 12:54 am
by saratogaWX
Answered in the thread https://www.wxforum.net/index.php?topic ... icseen#new

The double semi-colon is a non-harmful typo -- null PHP statements are ignored, but you're right, it looks funny and can be safely changed to a single semi-colon;

You sent me copies of your config and the cache file. Here's what I found:

I replicated the issue with the Notice errata for line 1119 .. it's caused by an entry in mybuoy-United_Kingdom.txt

Code: Select all

62001|Gascogne Buoy||
which has no coordinates listed .. either add coordinates to that line, or comment it out like

Code: Select all

#62001|Gascogne Buoy||
and that will suppress the Notice errata.

I was unable to replicate the line 355 Notice errata using your NDBC-buoydataM.txt file :(
The file did have the string looked for by the preg_match, and so it should have found the data accordingly.
Is this error persistent?

Best regards,
Ken

Re: buoy-data.php V1.19 released .. use curl/https for www.ndbc.noaa.gov data

Posted: Tue 03 Jul 2018 8:16 am
by ConligWX
Thanks Ken. All looks good now and not errors found since the change.

if anyone needs an upto date list of buoys that ndbc has it is here: https://www.ndbc.noaa.gov/mobile/region ... ed_kingdom

Re: buoy-data.php V1.19 released .. use curl/https for www.ndbc.noaa.gov data

Posted: Fri 06 Jul 2018 8:50 pm
by ConligWX
just about finished my UK map, different buoys and removed the oil platforms that were closed down.

https://www.conligwx.org/wxbuoy.php

just need to add a Station Legend.