I see what you mean.
When I right click on the page and 'View page source' the problem only occurs when the script, 'radar-status-getradar.php' tries to read in a new file to cache. Here are the relevant debugging messages when all is well:<div class="center" align="center" style="width:620px">
<!-- radar-status-getradar.php Version 5b - 26-Feb-2017 -->
<!-- using Cached version of ./cache/radar-status-KBIS.txt -->
<!-- 203 records found -->
<!--
UTCdate =1534264562 (2018-08-14 04:36:02)
lastUTCdate=1534264519 (2018-08-14 04:35:19)
-->
<!-- NEXRAD Radar KBIS status: Active [last data 43 secs ago] as of Tue, 14-Aug-2018 11:36am CDT -->
On the other hand, here are the debugging messages when the script displays abnormally:<div class="center" align="center" style="width:620px">
<!-- radar-status-getradar.php Version 5b - 26-Feb-2017 -->
<!-- loading ./cache/radar-status-KBIS.txt from http://radar3pub.ncep.noaa.gov/rcvxmit.sites.public.html -->
<!-- curl fetching 'http://radar3pub.ncep.noaa.gov/rcvxmit.sites.public.html' -->
<!-- curl Error: Resolving timed out after 6001 milliseconds -->
<!-- HTTP stats: RC=0 dest= port=0 (from sce=)
Times: dns=0.000 conn=0.000 pxfer=0.000 get=6.001 total=6.001 secs -->
<!-- headers returned:
-->
<br />
<b>Notice</b>: Undefined offset: 1 in <b>/home/bismarckweather/public_html/radar-status-getradar.php</b> on line <b>158</b><br />
<!-- appending ./cache/radar-status-KBIS.txt from http://radar3pub.ncep.noaa.gov/ftm.txt -->
<!-- curl fetching 'http://radar3pub.ncep.noaa.gov/ftm.txt' -->
<!-- HTTP stats: RC=200 dest=140.172.138.16 port=80 (from sce=107.180.109.46)
Times: dns=0.001 conn=0.053 pxfer=0.054 get=0.109 total=0.163 secs -->
<!-- problem fetching main/txtmsg file(s) -->
<!-- main content length=0, headers
-->
<!-- txtmsg content length=17549, headers
HTTP/1.1 200 OK
Date: Tue, 14 Aug 2018 16:55:54 GMT
Server: Apache
X-Frame-Options: SAMEORIGIN
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Last-Modified: Tue, 14 Aug 2018 16:54:03 GMT
ETag: "4fd0062-448d-573680eaa9a3f"
Accept-Ranges: bytes
Content-Length: 17549
Vary: Accept-Encoding
Content-Type: text/plain; charset=UTF-8
-->
<!-- cache not saved to ./cache/radar-status-KBIS.txt. -->
<!-- unable to process radar-status.. insufficient data -->
It looks like maybe the 'curl' functions aren't waiting long enough for a return. Try setting the timeout in 'radar-status-getradar.php' herefunction RS_fetchUrlWithoutHanging($url,$useFopen) {
// get contents from one URL and return as string
global $Debug, $needCookie;
$overall_start = time();
if (! $useFopen) {
// Set maximum number of seconds (can have floating-point) to wait for feed before displaying page without feed
$numberOfSeconds=6;
// Thanks to Curly from ricksturf.com for the cURL fetch functions
to something greater, such asfunction RS_fetchUrlWithoutHanging($url,$useFopen) {
// get contents from one URL and return as string
global $Debug, $needCookie;
$overall_start = time();
if (! $useFopen) {
// Set maximum number of seconds (can have floating-point) to wait for feed before displaying page without feed
$numberOfSeconds=15;
// Thanks to Curly from ricksturf.com for the cURL fetch functions
Hope this helps...