cURL - put output into variable?
Posted
by Mike
on Stack Overflow
See other posts from Stack Overflow
or by Mike
Published on 2010-04-05T09:17:50Z
Indexed on
2010/04/05
9:23 UTC
Read the original article
Hit count: 311
Hi,
I'm currently using this C code:
CURL *curl;
CURLcode res;
curl = curl_easy_init();
if (curl) {
curl_easy_setopt(curl, CURLOPT_URL, "http://my-domain.org/");
res = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
It prints the output on the console. How can I get the same output, but read it into, say, a string? (This is a probably a basic question, but I do not yet understand the libcurl API...)
Thanks for any help!
Mike
© Stack Overflow or respective owner