RE: [PHP] How to bypass (pipe) curl_exec return value directly to a file?
| From: | Andrea Giammarchi | Date: | Tue, 13 Oct 2009 18:58:23 +0000 |
| Subject: | RE: [PHP] How to bypass (pipe) curl_exec return value directly to a file? | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-298885@lists.php.net to get a copy of this message | ||
uhm, right, I should have better explain that option ... still, if timelimit is 0, I guess
connection timeout matters, maybe I am wrong.
Thanks.
Regards
> Date: Tue, 13 Oct 2009 11:31:00 -0700
> Subject: Re: [PHP] How to bypass (pipe) curl_exec return value directly to a file?
> From: larstorben@gmail.com
> To: an_red@hotmail.com
> CC: magda.hasibuan@yahoo.co.uk; php-general@lists.php.net
>
> 2009/10/13 Andrea Giammarchi <an_red@hotmail.com>:
> >
> >> > curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 0);
> >>
> >> I wouldn't recommend setting this to 0 unless you're very sure that
> >> the connection will succeed; otherwise, your script will hang
> >> indefinitely waiting for the connection to be made.
> >
> > agreed, it's just he set timeout to zero so I guess he meant the curl
> > connection as well otherwise it does not make sense to set the timeout to 0
> > if curl has 10 seconds timeout :-)
> >
> > Regards
>
> If he wants to download a very large file then it would make sense to
> set_time_limit(0) but leave the curl connect timeout enabled; he
> wouldn't want the PHP script timing out partway through a large
> download. :) The curl timeout isn't for the transfer; just for making
> the connection.
>
>
> Regards,
>
> Torben
_________________________________________________________________
Windows Live: Friends get your Flickr, Yelp, and Digg updates when they e-mail you.
http://www.microsoft.com/middleeast/windows/windowslive/see-it-in-action/social-network-basics.aspx?ocid=PID23461::T:WLMTAGL:ON:WL:en-xm:SI_SB_3:092010