[thelist] PHP and forcing a timeout? - addendum

Dave Preston caffiend at simianbrotherhood.org
Thu Nov 8 10:59:46 CST 2001

set_time_limit() is possibly what you want, although it is the time
limit for executing the entire script (page), there are some timeout
functions for sockets that might be more appropriate.

Poke around at this...


On Thu, Nov 08, 2001 at 11:30:25AM -0500, Nicole Parrot wrote:
> <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 "...
> ---------------------------------------
> For unsubscribe and other options, including
> the Tip Harvester and archive of TheList go to:
> http://lists.evolt.org Workers of the Web, evolt ! 

More information about the thelist mailing list