Hello there,
What would be a simple way to stream a file from a url?

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

Hey,

I read your post about using the curl library. Can you help me figure out what you meant when you wrote,

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

I am using VC++ 6.0 in XP. I am hoping to use the curl library to open 100000 http pages and save the results. Any help is appreciated.

Hi,
if there is a free solution, can someone put up a zip with the needed libs and a working example to do over modifies? Would be a great help to us!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.