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
> fil
2009/10/13 Andrea Giammarchi :
>
>> > 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
> > 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 m
2009/10/13 Andrea Giammarchi :
>
>> $ch = curl_init($url);
>> $fp = fopen('/tmp/curl.out', 'w');
>> curl_setopt($ch, CURLOPT_FILE, $fp);
>> curl_exec($ch);
>>
>> Error checking etc. is of course left up to you. :)
>
> oops, I sent directly the file name. Let me reformulate the code then:
>
>
> set_
> $ch = curl_init($url);
> $fp = fopen('/tmp/curl.out', 'w');
> curl_setopt($ch, CURLOPT_FILE, $fp);
> curl_exec($ch);
>
> Error checking etc. is of course left up to you. :)
oops, I sent directly the file name. Let me reformulate the code then:
set_time_limit(0);
$fp = fopen('stream.
ds
> From: magda.hasib...@yahoo.co.uk
> To: php-general@lists.php.net
> Date: Tue, 13 Oct 2009 11:01:04 +0700
> Subject: [PHP] How to bypass (pipe) curl_exec return value directly to a file?
>
> Newbie question.
> I need to download a very large amount of xml data from a site using
2009/10/12 m.hasibuan :
> Newbie question.
> I need to download a very large amount of xml data from a site using CURL.
>
> How to bypass (pipe) curl_exec return value directly to a file, without
> using memory allocation?
>
> set_time_limit(0);
> $ch = curl_init($siteURL);
> curl_setopt($ch, CURLO
Newbie question.
I need to download a very large amount of xml data from a site using CURL.
How to bypass (pipe) curl_exec return value directly to a file, without
using memory allocation?
set_time_limit(0);
$ch = curl_init($siteURL);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$mixed = curl
8 matches
Mail list logo