Are sure you have correctly changed the url to https: ?
currently:
Code: Select all
2019/02/18 20:30
YSCB 182030Z AUTO 34001KT 9999 // NCD 16/14 Q1008 RF00.0/000.0
So the station is up and running OK.
Back-up your bt-sager-wc.php and change the Begin METAR section to this:
Code: Select all
// Begin METAR:
echo "<!-- getting METAR for ".$ms. " -->\n";
// METAR Report:
$metarwx = curl_init();
curl_setopt ($metarwx, CURLOPT_URL, "https://tgftp.nws.noaa.gov/data/observations/metar/stations/$ms.TXT");
curl_setopt ($metarwx, CURLOPT_RETURNTRANSFER, 1);
$metar = curl_exec ($metarwx);
curl_close ($metarwx);
if(!$metar || !strpos ($metar, $ms)) {
echo "<!-- METAR FAIL or corrupted ".$metar. " -->\n";
} else {
echo "<!-- METAR OK -->\n";
}
// Removes unnecessary slashes from $metar:
Then view bt-sager.php (Which is really a status / debug page)
If you have "Forecast Unavailable" view page source and you should see "<!-- comment -->" on the METAR grab.
If successful you would see:
Code: Select all
<!-- getting METAR for YSCB -->
<!-- METAR OK -->