WXforum.net
Web Weather => Weather Website PHP/AJAX scripting => Topic started by: meteosanjuan on March 26, 2024, 06:13:37 PM
-
Hello, the advisorybox that I have included on the website does not work for me. Right now there is a warning issued by the meteorological agency and it does not indicate it. Furthermore, I get the feeling that it damages the presentation of the website, since it takes too long to load.
https://www.meteosanjuan.com/
What can I do to solve?
Thanks
-
I did a view-source of your wxadvisory.php?force=1 to cause the script to fetch the data from meteoalarm.org
It showed <!-- Fetch Status:
get-meteoalarm-warning-inc.php (976) ES_warnings: time spent: 30.0015 - invalid CURL Connection timed out after 30001 milliseconds https://feeds.meteoalarm.org/api/v1/warnings/feeds-spain
get-meteoalarm-warning-inc.php(386) invalid data load
-->
So the problem with the long delay (sometimes) when loading your page is due to the connectivity between your webserver and feeds.meteoalarm.org server. It is something that the technical support of your hoster will need to address.
When I load that feed, it takes 5 seconds to load the 1.6Mbytes of XML.
because the connection is timing out and not getting fresh data, it shows there are no alerts available.
-
The thing is, it worked before. Ok, let's see how I get that to the hosting provider.
Thanks Ken
-
Ken, would it be difficult to temporarily deactivate the advisorybox while they solve the problem? I'm afraid my ISP won't listen to me.
Thanks
-
Not at all difficult.
In Settings.php, change $SITE['useMeteoalarm'] = true;
to $SITE['useMeteoalarm'] = false;
and both the home page and wxadvisory.php will not try to load get-meteoalarm-warning-inc.php
-
Thanks Ken, I take note. Incredibly it works again and it hasn't been working for weeks and I haven't even contacted my ISP. So for now I'll leave it as is.
-
Some say "Internet happens" :roll: #-o (with a small snark in their voice).
There was likely a transient routing issue from your webserver to the feeds.meteoalarm.org webserver.
It's now responding to your query of it with < 1 second time get-meteoalarm-warning-inc.php (980) ES_warnings: time spent: 0.8225 - CURL OK for https://feeds.meteoalarm.org/api/v1/warnings/feeds-spain
Glad it's working for you again.
-
Glad it's working for you again.
How great you are Ken, thanks to you for always being there.