How do I return this
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
|
#include <stdio.h>
#include <curl.h>
int main ()
{
CURL *curl;
CURLcode res;
curl = curl_easy_init ();
if (curl)
{
curl_easy_setopt (curl, CURLOPT_URL, "http://example.com");
res = curl_easy_perform (curl);
curl_easy_cleanup (curl);
}
return 0;
}
|
This program prints the HTML of a webpage, but I'm not sure how I would return the HTML contents. Any help would be appreciated.
Use CURLOPT_WRITEFUNCTION to supply a user defined function when you take care yourself of the data received.
Topic archived. No new replies allowed.