[thelist] PHP and forcing a timeout?

Nicole Parrot nicole at parrot.ca
Thu Nov 8 10:24:16 CST 2001


Hi gang,

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 "...

Nicole





More information about the thelist mailing list