How to stop a curl while requesting or stop the running php script?

Posted by Chris on Stack Overflow See other posts from Stack Overflow or by Chris
Published on 2010-03-26T10:20:11Z Indexed on 2010/03/26 10:23 UTC
Read the original article Hit count: 301

Filed under:
|
|

I using url to request remote urls that sometimes may very slow or just down. In this case, my php scripts still waiting for the response, it makes apache has to many requests stay in memory and then overload. I need a way to stop curl requesting or stop running php script when specified time passed. I'd tried declare(), it makes no sense for curl. Can someone know how to solve it?

BTW: what is the effect of CURLOPT_CONNECTTIMEOUT and CURLOPT_TIMEOUT? They don't work like what I think.

© Stack Overflow or respective owner

Related posts about php

Related posts about apache