Re: Saving data received from http server

2010-11-12 Thread arnuld uttre
> On Fri, Nov 12, 2010 at 6:32 PM, Daniel Stenberg wrote: > On Fri, 12 Nov 2010, arnuld uttre wrote: > CURLOPT_WRITEFUNCTION sets the function that libcurl will call. > CURLOPT_WRITEDATA is used to set the pointer that the function gets in its > fourth argument. They're both needed to get this ri

Re: Saving data received from http server

2010-11-12 Thread Daniel Stenberg
On Fri, 12 Nov 2010, arnuld uttre wrote: See http://curl.haxx.se/libcurl/c/getinmemory.html (1) is it necessary to call CURLOPT_WRITEDATA after CURLOPT_WRITEFUNCTION. Can't CURLOPT_WRITEFUNCTION be used alone ? CURLOPT_WRITEFUNCTION sets the function that libcurl will call. CURLOPT_WRITEDA

Re: Saving data received from http server

2010-11-12 Thread arnuld uttre
> On Fri, Nov 12, 2010 at 5:32 PM, Daniel Stenberg wrote: > On Fri, 12 Nov 2010, arnuld uttre wrote: > See http://curl.haxx.se/libcurl/c/getinmemory.html Thanks Daniel :) Its very useful to me. I have read and hopefully, understood the code, have printed and reading libcurl tutorial. Just 2 qu

Re: Saving data received from http server

2010-11-12 Thread Daniel Stenberg
On Fri, 12 Nov 2010, arnuld uttre wrote: PROBLEM: A dirty brute-force approach used to save data. Have explained the problem in comments inside the program. Anyone has better idea ? See http://curl.haxx.se/libcurl/c/getinmemory.html -- / daniel.haxx.se -

Saving data received from http server

2010-11-12 Thread arnuld uttre
WANTED: save the incoming data from http server. WHAT I GOT: It works PROBLEM: A dirty brute-force approach used to save data. Have explained the problem in comments inside the program. Anyone has better idea ? I have written a simple program to receieve data from any HTTP server (learning to use