[thelist] PHP and forcing a timeout? - addendum

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

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

> I'm enjoying my first real foray into PHP (as opposed to ASP),
> 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
> 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
> file is reachable before attempting to open it?  I guess something like "
> ( fileexists) then retrieve "...

More information about the thelist mailing list