curl-library
Re: problem saving urlcode (string)
From: Toby Peterson <toby.peterson_at_gmail.com>
Date: Thu, 14 Apr 2005 07:09:25 -0400
Date: Thu, 14 Apr 2005 07:09:25 -0400
On 4/14/05, informatik4u_at_web.de <informatik4u_at_web.de> wrote:
> Hi, i am programming under linux a programm which loads a website with a xml structur.
> when i am trying to save the xmlcode string i get an empty file (1 byte large).
>
> here is my code for reading the string:
> ...
> res = curl_easy_perform(curl);
> xmldata = res; // xmldata is a c++ string
curl_easy_perform simply returns CURLcode (a status indication). To
read the data into memory, you'll need to use callbacks; something
similar to this example:
http://curl.haxx.se/lxr/source/docs/examples/getinmemory.c
- Toby
Received on 2005-04-14