Hello there,
What would be a simple way to stream a file from a url?
I figured it out.. Im using libcURL\
#include <curl/curl.h>
CURL *curl;
CURLcode results;
curl = curl_easy_init();
if(curl) {
curl_easy_setopt(curl, CURLOPT_URL, "curl.haxx.se");
results = curl_easy_perform(curl);
cout<<"results: "<<sizeof(results)<<" "<<results<<endl;
/* always cleanup */
curl_easy_cleanup(curl);
}
to include the right libs when linking type:
$curl-config --libs
-lcurl -lidn -llber -lldap -lrt -lgssapi_krb5 -lgssapi_krb5 -lz -lgnutls
$
and it will display all the needed libs