Page 1 of 4

Error regarding USNO Sunmoon data

Posted: Sat 01 Apr 2017 1:08 am
by ConligWX
Warning: Invalid argument supplied for foreach() in /share/htdocs/weather/get-USNO-sunmoon.php on line 359

Warning: Invalid argument supplied for foreach() in /share/htdocs/weather/get-USNO-sunmoon.php on line 368

I have deleted USNO-moondata.txt

but when it refreshes I get this inside.
HTTP/1.1 404 Not Found
Date: Sat, 01 Apr 2017 01:05:01 GMT
Server: Apache
Content-Length: 209
Connection: close
Content-Type: text/html; charset=iso-8859-1

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL /rstt/oneday was not found on this server.</p>
</body></html>
looks like the source is dead.

$USNOUrl = "http://199.211.133.93/rstt/oneday?date= ... myTZOffset";

Re: Error regarding USNO Sunmoon data

Posted: Sat 01 Apr 2017 4:48 pm
by saratogaWX
Wow, they seem to have 'pruned' the site and the links to the One Day http://aa.usno.navy.mil/data/docs/RS_OneDay.php is 404-Not found
as are all references to an 'API'.

Hopefully, it's a temporary issue .. I'll send a note and ask about the future of those functions. Would be a shame to lose the only worldwide and accurate API for the moon ephemeris from the net...

Re: Error regarding USNO Sunmoon data

Posted: Sat 01 Apr 2017 4:56 pm
by ConligWX
saratogaWX wrote:Wow, they seem to have 'pruned' the site and the links to the One Day http://aa.usno.navy.mil/data/docs/RS_OneDay.php is 404-Not found
as are all references to an 'API'.

Hopefully, it's a temporary issue .. I'll send a note and ask about the future of those functions. Would be a shame to lose the only worldwide and accurate API for the moon ephemeris from the net...
Thanks Ken!

Re: Error regarding USNO Sunmoon data

Posted: Sun 02 Apr 2017 12:16 am
by ConligWX
saratogaWX wrote:Wow, they seem to have 'pruned' the site and the links to the One Day http://aa.usno.navy.mil/data/docs/RS_OneDay.php is 404-Not found
as are all references to an 'API'.
looks like everything has gone!

http://www.usno.navy.mil/USNO/astronomi ... a-services

Data Services
Rise/Set/Transit/Twilight Data
  • Complete Sun and Moon Data for One Day
  • Table of Sunrise/Sunset, Moonrise/Moonset, or Twilight Times for an Entire Year
  • Rise/Set/Transit Times for Major Solar System Objects and Bright Stars
  • Duration of Daylight/Darkness Table for One Year
Phases of the Moon
  • Dates of Primary Phases of the Moon
  • Fraction of the Moon Illuminated
  • What the Moon Looks Like Now

Re: Error regarding USNO Sunmoon data

Posted: Sun 02 Apr 2017 1:43 am
by Simnm
Thank saratogaWX

Re: Error regarding USNO Sunmoon data

Posted: Sun 02 Apr 2017 9:48 pm
by saratogaWX
I did post a comment to the webmaster on the usno.navy.mil site asking about the missing scripts/API functions.

Haven't heard from them yet...

Re: Error regarding USNO Sunmoon data

Posted: Sun 02 Apr 2017 11:53 pm
by ConligWX
Yep me too. hopefully someone will answer on monday morning.

Re: Error regarding USNO Sunmoon data

Posted: Mon 03 Apr 2017 2:47 am
by beteljuice
Perhaps D.T. has determined the Sun and Moon is important to those of a certain following and issued an executive descision ?

Re: Error regarding USNO Sunmoon data

Posted: Mon 03 Apr 2017 3:21 pm
by saratogaWX
:lol: However, we feel more like :bash: based on the pronouncements. Mostly, many of us are just :oops: :o :shock: :?

The good news is that the USNO site is back operational. Guess they restored the missing PHP scripts to the site for the queries. :groan:

Re: Error regarding USNO Sunmoon data

Posted: Mon 03 Apr 2017 5:02 pm
by ConligWX
saratogaWX wrote::lol: However, we feel more like :bash: based on the pronouncements. Mostly, many of us are just :oops: :o :shock: :?

The good news is that the USNO site is back operational. Guess they restored the missing PHP scripts to the site for the queries. :groan:
I think the whole DATA folder was missing.

Re: Error regarding USNO Sunmoon data

Posted: Mon 03 Apr 2017 5:30 pm
by saratogaWX
But... the API is now working again. From a view-source of your homepage
<!-- get-USNO-sunmoon.php - Version 2.04 - 11-Nov-2015 -->
<!-- refetch seconds=3600 -->
<!-- using Cached version of ./cache/USNO-moondata.txt -->
<!-- unchunking response -->
<!-- in=860 out=860 bytes -->
<!-- processing JSON entries for Moon data -->
<!-- json_decode returns - No errors -->
<!-- note: 'curphase' not in JSON. Used 'closestphase' instead. -->
<!-- note: 'fracillum' not in JSON, 'illumination' set to '50%' based on moon phase of 'First Quarter'. -->
<!-- USNOdata
Array
(
[beginciviltwilight] => 06:13
[beginciviltwilightdate] => 03/04/2017
[sunrise] => 06:50
[sunrisedate] => 03/04/2017
[suntransit] => 13:26
[suntransitdate] => 03/04/2017
[sunset] => 20:03
[sunsetdate] => 03/04/2017
[endciviltwilight] => 20:40
[endciviltwilightdate] => 03/04/2017
[moonset] => 02:49
[moonsetdate] => 03/04/2017
[moonrise] => 11:20
[moonrisedate] => 03/04/2017
[moontransit] => 19:33
[moontransitdate] => 03/04/2017
[moonsetnext] => 03:44
[moonsetnextdate] => 04/04/2017
[moonphase] => First Quarter
[illumination] => 50%
[hoursofpossibledaylight] => 13:13
)
-->
:clap:

Re: Error regarding USNO Sunmoon data

Posted: Mon 03 Apr 2017 5:48 pm
by ConligWX
saratogaWX wrote:But... the API is now working again. From a view-source of your homepage
yep thats right, just the data folder was completely missing from http://aa.usno.navy.mil/data/ when the error appeared. looks liek all the links are now working again from that site:

http://www.usno.navy.mil/USNO/astronomi ... a-services

Re: Error regarding USNO Sunmoon data

Posted: Wed 03 May 2017 2:54 pm
by ConligWX
I'm seeing problems again with this script. anyone else? looks like the site is down.

Re: Error regarding USNO Sunmoon data

Posted: Wed 03 May 2017 3:14 pm
by PaulMy
Yes, I also get this:
http://www.komokaweather.com/komokaweat ... ronomy.php
Warning: Invalid argument supplied for foreach() in /home/content/96/5379896/html/komokaweather-ca/get-USNO-sunmoon.php on line 359
Warning: Invalid argument supplied for foreach() in /home/content/96/5379896/html/komokaweather-ca/get-USNO-sunmoon.php on line 368


Paul

Re: Error regarding USNO Sunmoon data

Posted: Wed 03 May 2017 3:57 pm
by saratogaWX
This time, their DNS is fine, it's just the server that's having a problem.
<!-- loading ./cache/USNO-moondata.txt from http://api.usno.navy.mil/rstt/oneday?da ... 4323&tz=-7 -->
<!-- GET /rstt/oneday?date=05/03/2017&coords=37.27153397,-122.02274323&tz=-7 HTTP/1.1
Host: api.usno.navy.mil Port: 80 IP=199.211.133.93-->
<!-- Network error: Connection timed out (110) -->
<!-- HTTP stats: dns=0.136 conn=5.008 put=n/a get( blocks)=n/a close=n/a total=5.144 secs -->
<!-- fetch function elapsed= 5 secs. -->