Josh Angstadt wrote:
>        curl_easy_setopt(curl, CURLOPT_READFUNCTION, read_callback);
>        curl_easy_setopt(curl, CURLOPT_READDATA, result);

Your program is supposed to DOWNLOAD, isn't it ?

The http://curl.haxx.se/libcurl/c/CURLOPT_READFUNCTION.html specifies:

CURLOPT_READFUNCTION - read callback for data UPLOADS.

You probably need to use
http://curl.haxx.se/libcurl/c/CURLOPT_WRITEFUNCTION.html instead.

If you just want to write received data to a file, use CURLOPT_WRITEDATA
with the preopened FILE * (CURLOPT_WRITEFUNCTION is set to fwrite by
default).
If you want to process data before writing it somewhere, please see
example http://curl.haxx.se/libcurl/c/getinmemory.html

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html

Reply via email to