Re: PHP Weather Timeouts
Brought to you by:
iridium
From: Martin G. <gim...@gi...> - 2003-03-02 20:21:55
|
"Danny Ledger" <da...@sq...> writes: > This is a multipart question.... > > How does PHP Weather address timeouts? For example, what is the > expected behavior if the NWS site is down? In that case, PHP Weather will report that there's no data for the station. The database will be updated with an empty METAR, but it's timestamp will be set to expire 10 minutes in the future, so that METAR looks fresh for 10 minutes. > I don't know much about fsokopen() and file() functions. I do know > that PHP handles files and sockets the same. In addition, it would > seem that best practices suggest using socket_set_timeout() which > sets the timeout after the connection is made. Hmm, yes perhaps... so we should set the timeout so something like 10 seconds instead of the default 60 seconds, or whatever the default might be? > If PHP Weather has logic to gracefully fail in the event of an NWS > outage, can someone please point me at it? I don't know if it's graceful, but it basically reports what it sees: that there's no data for the station. -- Martin Geisler My GnuPG Key: 0xF7F6B57B See http://gimpster.com/ and http://phpweather.net/ for: PHP Weather => Shows the current weather on your webpage and PHP Shell => A telnet-connection (almost :-) in a PHP page. |