"Michael Willems" <[EMAIL PROTECTED]> writes:

> Hello,
> 1. If we use:
>       <?php
>       include('phpweather.inc');
>       register_shutdown_function('update_metars_db');
>       ?>
> ..what happens when noaa is dead and meanwhile our page is hit
> hundreds of times? Hundreds of processes on our machine ever so
> slowly timing out, or does php handle this nicely?

My guess is, that the script it terminated after 30 seconds - I hope
PHP can handle this nicely :-)

> 2. Another thing to do is to run a cron job that every 15 minutes
> hits the page, as in
> 0,15,30,45 * * * * lynx http://www.yourwxpage.com -dump -source 2>%1
> 1>/dev/null
> but that of course does not solve the problem of what happens when
> the noaa page is dead; it simply ensures we always have a recent
> update in our database when the site IS up.

Well, if there's no METAR, the timestamp for that particular station,
so that it's 50 minutes old. This means that get_metar_from_db() will
use the empty METAR for the next 10 minutes. This happens in

> Cheers
> Michael
> www.mvw.net

Best regards,
Martin Geisler

Checkout http://www.gimpster.com for:
PHP Weather => Shows the current weather on your webpages.
PHP Shell   => A telnet-connection (almost :-) in a PHP page.

Reply via email to