Re: Timeout Function
| From: | Jason Sims | Date: | Tue, 24 Apr 2001 21:08:24 +0000 |
| Subject: | Re: Timeout Function | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-52313@lists.php.net to get a copy of this message | ||
> That's not true. If you use register_shutdown_function() then this
> function you register will be run once the timeout hits. See the chapter
> in the manual on connection handling.
But this still doesn't let you apply a timeout to a specific block of code.
I am doing ad calls to a remote server with PHP, and I want to be able to
timeout just the readfile() function I'm using to do the call, and to
execute an alternate block of code when it times out. I don't want to abort
execution of the entire script; just that portion thereof.
I am including a small file with some PHP code in a larger script; can I
have a separate timeout for the included script, or does it apply to the
main script? If I could have separate timeouts for included scripts, it
could serve as a workaround for using timeouts on specific blocks of code.
--
Jason Sims
Senior Editor & System Administrator
Inside Mac Games
http://www.insidemacgames.com