[thelist] PHP and forcing a timeout? - addendum

Nicole Parrot nicole at parrot.ca
Thu Nov 8 10:28:21 CST 2001


<Addendum>
I realise that the fopen function will eventually timeout by itself but the
delay is too long for me.  I'm picky :-)
</Addendum>
Nicole


> I'm enjoying my first real foray into PHP (as opposed to ASP),
implementing
> a bit of news syndication. However, I just ran into my first major hurdle.
>
> My little program queries one of three sites for news retrieval, and grabs
> the news, throws them into my own database for later queries.  This
morning,
> one of the three sites was down, and my poor little PHP just hung there,
> trying to retrieve the XML feed forever.
>
> Is it possible to have some sort of timeout? Or to verify that the
external
> file is reachable before attempting to open it?  I guess something like "
if
> ( fileexists) then retrieve "...






More information about the thelist mailing list