Philippe BEAU | 1 Nov 05:49 2006
Picon

PHP/CURL Compilation problem

Hello All,

I would like to compile cURL support with PHP 4.4.2. I take a recent
version of curl/libcurl (the latest) it compile well.

when i compil i have this message :

/src/php-4.4.2/ext/curl/curl.c: In function `zm_startup_curl':
/src/php-4.4.2/ext/curl/curl.c:207: `CURLOPT_FTPASCII' undeclared (first
use in this function)
/src/php-4.4.2/ext/curl/curl.c:207: (Each undeclared identifier is
reported only once
/src/php-4.4.2/ext/curl/curl.c:207: for each function it appears in.)
/src/php-4.4.2/ext/curl/curl.c:245: `CURLOPT_PASSWDFUNCTION' undeclared
(first use in this function)

All the CURL file on the harddrive have been deleted before installing new
libs. i try from RPM, rebuild RPM, of From Source. Same errors !

Also, i found a solution, but ...

for CURLOPT_FTPASCII :

in curl sources : lib/url.c

case CURLOPT_TRANSFERTEXT:
    /*
     * This option was previously named 'FTPASCII'. Renamed to work with
     * more protocols than merely FTP.
     *
(Continue reading)

Daniel Stenberg | 1 Nov 09:15 2006
Picon

Re: PHP/CURL Compilation problem

On Wed, 1 Nov 2006, Philippe BEAU wrote:

> I would like to compile cURL support with PHP 4.4.2. I take a recent version 
> of curl/libcurl (the latest) it compile well.
>
> when i compil i have this message :
>
> /src/php-4.4.2/ext/curl/curl.c:207: `CURLOPT_FTPASCII' undeclared
> /src/php-4.4.2/ext/curl/curl.c:245: `CURLOPT_PASSWDFUNCTION' undeclared

Right, these symbols have been erased from libcurl now since they've been 
obsolete and deprecated for many years. You should probably:

1 - use a more recent PHP that doesn't use these symbols
2 - modify the PHP/CURL source code to use the correct symbols and mail the
     PHP team a patch or possibly:
3 - if there is none, report it as a bug to the PHP team
4 - use an older libcurl release where they were still present

--

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php

Steve Kirtley | 1 Nov 12:08 2006
Picon

PHP/CURL Compulation problem

Strange - I was getting exactly the same errors with the latest download of PHP 4.4.4 and Curl/LibCurl...
 
Yet with mine it compiled fine with PHP 4.2.2.
 
Message: 2
Date: Wed, 1 Nov 2006 05:49:17 +0100 (CET)
From: "Philippe BEAU" <philippe <at> choup.net>
Subject: PHP/CURL Compilation problem
To: curl-and-php <at> cool.haxx.se
Message-ID: < 53105.86.209.72.168.1162356557.squirrel <at> www.choup.net>
Content-Type: text/plain;charset=iso-8859-1

Hello All,

I would like to compile cURL support with PHP 4.4.2. I take a recent
version of curl/libcurl (the latest) it compile well.

when i compil i have this message :

/src/php-4.4.2/ext/curl/curl.c: In function `zm_startup_curl':
/src/php-4.4.2/ext/curl/curl.c:207: `CURLOPT_FTPASCII' undeclared (first
use in this function)
/src/php- 4.4.2/ext/curl/curl.c:207: (Each undeclared identifier is
reported only once
/src/php-4.4.2/ext/curl/curl.c:207: for each function it appears in.)
/src/php-4.4.2/ext/curl/curl.c:245: `CURLOPT_PASSWDFUNCTION' undeclared
(first use in this function)

All the CURL file on the harddrive have been deleted before installing new
libs. i try from RPM, rebuild RPM, of From Source. Same errors !

Also, i found a solution, but ...

for CURLOPT_FTPASCII :

in curl sources : lib/url.c

case CURLOPT_TRANSFERTEXT:
   /*
    * This option was previously named 'FTPASCII'. Renamed to work with
    * more protocols than merely FTP.
    *
    * Transfer using ASCII (instead of BINARY).
    */
   data->set.prefer_ascii = (bool)(0 != va_arg(param, long));
   break;


-> is CURLOPT_FTPASCII is renamed by CURLOPT_TRANSFERTEXT ?
-> is CURLOPT_PASSWDFUNCTION is misdeclared in lib (not present in .h file
?) that PHP don't find it well ? If i comment in curl.c the 2 lines
concerned, it's work well ...

Philippe,
 
_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
Rajalakshmi Murali | 1 Nov 15:57 2006
Picon

Curl to Access Remote Server via ISA Proxy Server


Hi

I displayed the information I received using the command curl_getinfo()
funciton is as follows:-

(Embedded image moved to file: pic02016.jpg)

Thanks
Best
Raji

Rajalakshmi Murali
Application Developer
Field Information Services Unit
United Nations Office for the Coordination of Humanitarian Affairs
New York

Tel: +1 917-367-2177
E-mail: murali <at> un.org

                                                                           
             curl-and-php-requ                                             
             est <at> cool.haxx.se                                              
             Sent by:                                                   To 
             curl-and-php-boun         curl-and-php <at> cool.haxx.se           
             ces <at> cool.haxx.se                                           cc 

                                                                   Subject 
             31/10/2006 06:00          curl-and-php Digest, Vol 14, Issue  
             AM                        13                                  

                                                                           
             Please respond to                                             
             curl-and-php <at> cool                                             
                 .haxx.se                                                  

Send curl-and-php mailing list submissions to
             curl-and-php <at> cool.haxx.se

To subscribe or unsubscribe via the World Wide Web, visit
             http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
or, via email, send a message with subject or body 'help' to
             curl-and-php-request <at> cool.haxx.se

You can reach the person managing the list at
             curl-and-php-owner <at> cool.haxx.se

When replying, please edit your Subject line so it is more specific
than "Re: Contents of curl-and-php digest..."

Today's Topics:

   1. Re: curl via  ISA Proxy Server (Daniel Stenberg)

----------------------------------------------------------------------

Message: 1
Date: Tue, 31 Oct 2006 09:09:53 +0100 (CET)
From: Daniel Stenberg <daniel <at> haxx.se>
Subject: Re: curl via  ISA Proxy Server
To: curl with PHP <curl-and-php <at> cool.haxx.se>
Message-ID: <Pine.LNX.4.64.0610310908240.6395 <at> yvahk3.pbagnpgbe.fr>
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed

On Mon, 30 Oct 2006, Rajalakshmi Murali wrote:

> My web application on a local server uses curl to connect via a proxy to
the
> internet to another global server to exchange data.  The proxy is Windows

> Server 2003 with ISA Server 2004 .

> I am getting a status code of 0.  Could you please advise me as to what
is
> it I am doing wrong?

There's a huge lack of details in your mail, but I would guess that your
request failed already on the CONNECT and you're not checking the
CURLINFO_HTTP_CONNECTCODE.

--
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html

------------------------------

_______________________________________________
curl-and-php mailing list
curl-and-php <at> cool.haxx.se
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php

End of curl-and-php Digest, Vol 14, Issue 13
********************************************


Rajalakshmi Murali
Application Developer
Field Information Services Unit
United Nations Office for the Coordination of Humanitarian Affairs
New York

Tel: +1 917-367-2177
E-mail: murali <at> un.org

                                                                           
             curl-and-php-requ                                             
             est <at> cool.haxx.se                                              
             Sent by:                                                   To 
             curl-and-php-boun         curl-and-php <at> cool.haxx.se           
             ces <at> cool.haxx.se                                           cc 

                                                                   Subject 
             01/11/2006 06:00          curl-and-php Digest, Vol 15, Issue  
             AM                        1                                   

                                                                           
             Please respond to                                             
             curl-and-php <at> cool                                             
                 .haxx.se                                                  

Send curl-and-php mailing list submissions to
             curl-and-php <at> cool.haxx.se

To subscribe or unsubscribe via the World Wide Web, visit
             http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
or, via email, send a message with subject or body 'help' to
             curl-and-php-request <at> cool.haxx.se

You can reach the person managing the list at
             curl-and-php-owner <at> cool.haxx.se

When replying, please edit your Subject line so it is more specific
than "Re: Contents of curl-and-php digest..."

Today's Topics:

   1. response code problem (Daniel Stenberg)
   2. PHP/CURL Compilation problem (Philippe BEAU)
   3. Re: PHP/CURL Compilation problem (Daniel Stenberg)

----------------------------------------------------------------------

Message: 1
Date: Tue, 31 Oct 2006 22:55:06 +0100 (CET)
From: Daniel Stenberg <daniel <at> haxx.se>
Subject: response code problem
To: curl with PHP <curl-and-php <at> cool.haxx.se>
Message-ID: <Pine.LNX.4.64.0610312249170.11364 <at> yvahk3.pbagnpgbe.fr>
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed

On Tue, 31 Oct 2006, Rajalakshmi Murali wrote:

You should seriously read through our mailing list etiquette:
http://curl.haxx.se/mail/etiquette.html - you violated several of the items

mentioned there.

> I have an option within my web application, where I accept the Remote
Host
> URL or IP address to connect, from the user and use curl to connect and
> process data.  If there is no proxy server then the connection and the
data
> exchange goes through fine.
>
> When there is an intermediate ISA Proxy Server to connect to the
internet,
> the user has to specify the Proxy Server address, windows login info.
>
> The code I use when there is a proxy server is as follows:-

>                  curl_setopt($ch, CURLOPT_HTTPPROXYTUNNEL,1);

And your proxy server allows this? What response headers do you get back
from
your proxy?

--
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html

------------------------------

Message: 2
Date: Wed, 1 Nov 2006 05:49:17 +0100 (CET)
From: "Philippe BEAU" <philippe <at> choup.net>
Subject: PHP/CURL Compilation problem
To: curl-and-php <at> cool.haxx.se
Message-ID: <53105.86.209.72.168.1162356557.squirrel <at> www.choup.net>
Content-Type: text/plain;charset=iso-8859-1

Hello All,

I would like to compile cURL support with PHP 4.4.2. I take a recent
version of curl/libcurl (the latest) it compile well.

when i compil i have this message :

/src/php-4.4.2/ext/curl/curl.c: In function `zm_startup_curl':
/src/php-4.4.2/ext/curl/curl.c:207: `CURLOPT_FTPASCII' undeclared (first
use in this function)
/src/php-4.4.2/ext/curl/curl.c:207: (Each undeclared identifier is
reported only once
/src/php-4.4.2/ext/curl/curl.c:207: for each function it appears in.)
/src/php-4.4.2/ext/curl/curl.c:245: `CURLOPT_PASSWDFUNCTION' undeclared
(first use in this function)

All the CURL file on the harddrive have been deleted before installing new
libs. i try from RPM, rebuild RPM, of From Source. Same errors !

Also, i found a solution, but ...

for CURLOPT_FTPASCII :

in curl sources : lib/url.c

case CURLOPT_TRANSFERTEXT:
    /*
     * This option was previously named 'FTPASCII'. Renamed to work with
     * more protocols than merely FTP.
     *
     * Transfer using ASCII (instead of BINARY).
     */
    data->set.prefer_ascii = (bool)(0 != va_arg(param, long));
    break;

-> is CURLOPT_FTPASCII is renamed by CURLOPT_TRANSFERTEXT ?
-> is CURLOPT_PASSWDFUNCTION is misdeclared in lib (not present in .h file
?) that PHP don't find it well ? If i comment in curl.c the 2 lines
concerned, it's work well ...

Philippe,

------------------------------

Message: 3
Date: Wed, 1 Nov 2006 09:15:12 +0100 (CET)
From: Daniel Stenberg <daniel <at> haxx.se>
Subject: Re: PHP/CURL Compilation problem
To: curl with PHP <curl-and-php <at> cool.haxx.se>
Message-ID: <Pine.LNX.4.64.0611010912450.11364 <at> yvahk3.pbagnpgbe.fr>
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed

On Wed, 1 Nov 2006, Philippe BEAU wrote:

> I would like to compile cURL support with PHP 4.4.2. I take a recent
version
> of curl/libcurl (the latest) it compile well.
>
> when i compil i have this message :
>
> /src/php-4.4.2/ext/curl/curl.c:207: `CURLOPT_FTPASCII' undeclared
> /src/php-4.4.2/ext/curl/curl.c:245: `CURLOPT_PASSWDFUNCTION' undeclared

Right, these symbols have been erased from libcurl now since they've been
obsolete and deprecated for many years. You should probably:

1 - use a more recent PHP that doesn't use these symbols
2 - modify the PHP/CURL source code to use the correct symbols and mail the
     PHP team a patch or possibly:
3 - if there is none, report it as a bug to the PHP team
4 - use an older libcurl release where they were still present

--
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html

------------------------------

_______________________________________________
curl-and-php mailing list
curl-and-php <at> cool.haxx.se
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php

End of curl-and-php Digest, Vol 15, Issue 1
*******************************************
_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
Rajalakshmi Murali | 1 Nov 16:25 2006
Picon

Query Remote Server via ISA Proxy Server

Hi
I had sent an image of the output earlier.  I noticed it was not visible.
Hence I am sending the same as text

HTTP code:0  Received HTTP Code 502 from proxy after Connect – Error No.56
Array
(
    [url] => http://3w.unocha.org/WhoWhatWhere/transfer.php
    [http_code] => 0
    [header_size] => 0
    [request_size] => 0
    [filetime] => -1
    [ssl_verify_result] => 0
    [redirect_count] => 0
    [total_time] => 0
    [namelookup_time] => 0
    [connect_time] => 0
    [pretransfer_time] => 0
    [size_upload] => 0
    [size_download] => 0
    [speed_download] => 0
    [speed_upload] => 0
    [download_content_length] => 0
    [upload_content_length] => 0
    [starttransfer_time] => 0
    [redirect_time] => 0
)

Thanks
Best
Raji

Rajalakshmi Murali
Application Developer
Field Information Services Unit
United Nations Office for the Coordination of Humanitarian Affairs
New York

Tel: +1 917-367-2177
E-mail: murali <at> un.org

                                                                           
             curl-and-php-requ                                             
             est <at> cool.haxx.se                                              
             Sent by:                                                   To 
             curl-and-php-boun         curl-and-php <at> cool.haxx.se           
             ces <at> cool.haxx.se                                           cc 

                                                                   Subject 
             01/11/2006 06:00          curl-and-php Digest, Vol 15, Issue  
             AM                        1                                   

                                                                           
             Please respond to                                             
             curl-and-php <at> cool                                             
                 .haxx.se                                                  

Send curl-and-php mailing list submissions to
             curl-and-php <at> cool.haxx.se

To subscribe or unsubscribe via the World Wide Web, visit
             http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
or, via email, send a message with subject or body 'help' to
             curl-and-php-request <at> cool.haxx.se

You can reach the person managing the list at
             curl-and-php-owner <at> cool.haxx.se

When replying, please edit your Subject line so it is more specific
than "Re: Contents of curl-and-php digest..."

Today's Topics:

   1. response code problem (Daniel Stenberg)
   2. PHP/CURL Compilation problem (Philippe BEAU)
   3. Re: PHP/CURL Compilation problem (Daniel Stenberg)

----------------------------------------------------------------------

Message: 1
Date: Tue, 31 Oct 2006 22:55:06 +0100 (CET)
From: Daniel Stenberg <daniel <at> haxx.se>
Subject: response code problem
To: curl with PHP <curl-and-php <at> cool.haxx.se>
Message-ID: <Pine.LNX.4.64.0610312249170.11364 <at> yvahk3.pbagnpgbe.fr>
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed

On Tue, 31 Oct 2006, Rajalakshmi Murali wrote:

You should seriously read through our mailing list etiquette:
http://curl.haxx.se/mail/etiquette.html - you violated several of the items

mentioned there.

> I have an option within my web application, where I accept the Remote
Host
> URL or IP address to connect, from the user and use curl to connect and
> process data.  If there is no proxy server then the connection and the
data
> exchange goes through fine.
>
> When there is an intermediate ISA Proxy Server to connect to the
internet,
> the user has to specify the Proxy Server address, windows login info.
>
> The code I use when there is a proxy server is as follows:-

>                  curl_setopt($ch, CURLOPT_HTTPPROXYTUNNEL,1);

And your proxy server allows this? What response headers do you get back
from
your proxy?

--
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html

------------------------------

Message: 2
Date: Wed, 1 Nov 2006 05:49:17 +0100 (CET)
From: "Philippe BEAU" <philippe <at> choup.net>
Subject: PHP/CURL Compilation problem
To: curl-and-php <at> cool.haxx.se
Message-ID: <53105.86.209.72.168.1162356557.squirrel <at> www.choup.net>
Content-Type: text/plain;charset=iso-8859-1

Hello All,

I would like to compile cURL support with PHP 4.4.2. I take a recent
version of curl/libcurl (the latest) it compile well.

when i compil i have this message :

/src/php-4.4.2/ext/curl/curl.c: In function `zm_startup_curl':
/src/php-4.4.2/ext/curl/curl.c:207: `CURLOPT_FTPASCII' undeclared (first
use in this function)
/src/php-4.4.2/ext/curl/curl.c:207: (Each undeclared identifier is
reported only once
/src/php-4.4.2/ext/curl/curl.c:207: for each function it appears in.)
/src/php-4.4.2/ext/curl/curl.c:245: `CURLOPT_PASSWDFUNCTION' undeclared
(first use in this function)

All the CURL file on the harddrive have been deleted before installing new
libs. i try from RPM, rebuild RPM, of From Source. Same errors !

Also, i found a solution, but ...

for CURLOPT_FTPASCII :

in curl sources : lib/url.c

case CURLOPT_TRANSFERTEXT:
    /*
     * This option was previously named 'FTPASCII'. Renamed to work with
     * more protocols than merely FTP.
     *
     * Transfer using ASCII (instead of BINARY).
     */
    data->set.prefer_ascii = (bool)(0 != va_arg(param, long));
    break;

-> is CURLOPT_FTPASCII is renamed by CURLOPT_TRANSFERTEXT ?
-> is CURLOPT_PASSWDFUNCTION is misdeclared in lib (not present in .h file
?) that PHP don't find it well ? If i comment in curl.c the 2 lines
concerned, it's work well ...

Philippe,

------------------------------

Message: 3
Date: Wed, 1 Nov 2006 09:15:12 +0100 (CET)
From: Daniel Stenberg <daniel <at> haxx.se>
Subject: Re: PHP/CURL Compilation problem
To: curl with PHP <curl-and-php <at> cool.haxx.se>
Message-ID: <Pine.LNX.4.64.0611010912450.11364 <at> yvahk3.pbagnpgbe.fr>
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed

On Wed, 1 Nov 2006, Philippe BEAU wrote:

> I would like to compile cURL support with PHP 4.4.2. I take a recent
version
> of curl/libcurl (the latest) it compile well.
>
> when i compil i have this message :
>
> /src/php-4.4.2/ext/curl/curl.c:207: `CURLOPT_FTPASCII' undeclared
> /src/php-4.4.2/ext/curl/curl.c:245: `CURLOPT_PASSWDFUNCTION' undeclared

Right, these symbols have been erased from libcurl now since they've been
obsolete and deprecated for many years. You should probably:

1 - use a more recent PHP that doesn't use these symbols
2 - modify the PHP/CURL source code to use the correct symbols and mail the
     PHP team a patch or possibly:
3 - if there is none, report it as a bug to the PHP team
4 - use an older libcurl release where they were still present

--
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html

------------------------------

_______________________________________________
curl-and-php mailing list
curl-and-php <at> cool.haxx.se
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php

End of curl-and-php Digest, Vol 15, Issue 1
*******************************************

_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
Kelton Woodman | 6 Nov 07:50 2006
Picon

post php code

Hi Guys,
 
Need some help here. I am trying to post some html code via curl.  The problem is that when I urlencode the variable it messes up the html code and so instead of being read by the browser as html code it is outputed as text (url encoded text).
 
By the way the form that I'm posting too is a wordpress form which normally accepts html input.  Any ways on how this could be done will be much appreciated. Thanks.

Check out some new online services at Windows Live Ideas—so new they haven’t even been officially released yet. Try it!
_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
Daniel Stenberg | 6 Nov 09:18 2006
Picon

Re: post php code

On Mon, 6 Nov 2006, Kelton Woodman wrote:

> Need some help here. I am trying to post some html code via curl.  The 
> problem is that when I urlencode the variable it messes up the html code and 
> so instead of being read by the browser as html code it is outputed as text 
> (url encoded text).

So urlencode only the pieces that you have to encode and leave the rest as-is!

--

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php

Tim Schwartz | 21 Nov 04:36 2006
Picon

decoding iso-8859-1 characters

Hello All,

I am currently stumped, and have been looking around for an answer but haven't found it. I hope i'm not wasting time with this one. I have an html page im scraping this is in the header of the page..

<meta http-equiv="Content-Type" content= "text/html; Charset=iso-8859-1" />


Unfortunatly after grabing the data of the page with this line of code....


<?php

$url = " http://www.artbaselmiamibeach.com/ca/en/fpg/";
        $ch = curl_init ();
        curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
        curl_setopt ($ch, CURLOPT_URL, $url);
        curl_setopt ($ch, CURLOPT_TIMEOUT, 60);
        $data = curl_exec ($ch);
        curl_close ($ch);
           echo $data;

    preg_match("/<td valign=\"top\" nowrap=\"nowrap\">Artists at Art Basel Miami Beach(.*<\/b>)<\/td>/s",$data, $artists);
    preg_match("/<b>(.*)<\/b>/s",$artists[1],$artists);
    $pattern = '/(<br\/>.)/s';
    $replacement = ',';
    echo preg_replace($pattern, $replacement, $artists[1]);
    echo ",";
   
?>


All of the valuable foreign characters have been changed to question marks for example of getting "Joan Miró" i get "Joan Mir?", and that is not good for a project based on gathering data on a name.

Any suggestions?

Thanks again!

-tim
_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
Daniel Stenberg | 21 Nov 09:07 2006
Picon

Re: decoding iso-8859-1 characters

On Mon, 20 Nov 2006, Tim Schwartz wrote:

> <meta http-equiv="Content-Type" content="text/html; Charset=iso-8859-1" />

That's the charset you use locally in your HTML.

>       curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
>       curl_close ($ch);
>        echo $data;

Then you've fetched a remote document that may not be using iso-8859-1. To be 
really sure, you should check and if necessary convert that accordingly before 
you output it.

--

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php

Cip | 21 Nov 10:10 2006
Picon

Large form POST problem

Is there any limitation to the amount of data that can be sent to a form via Curl?

Here is my code:

$st="...(string to post is formed from different variables read from file)...";
$lngth=strlen($st);
$ch = curl_init();
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_URL, $url2);
$fp = fopen("example_homepage2.txt", "w");
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT,20);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch, CURLOPT_REFERER, $url);
curl_setopt($ch, CURLOPT_FILE, $fp);
curl_setopt($ch, CURLOPT_COOKIEFILE, "cookie.txt");
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDSIZE, $lngth);
curl_setopt($ch, CURLOPT_POSTFIELDS, $st);
$page2=curl_exec($ch);
curl_close($ch);
fclose($fp);


I am saving the returned contents to a file. This code works fine for strings smaller than 800 characters (actually 795 or so), but my regular string is just under 9000 characters.
What can I do?

_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php

Gmane