curl-users
(no subject)
Date: Mon, 19 Feb 2001 10:11:44 +0800
Dear Daniel,
I'm successfully to get the libcurl.lib out. Now I have other problem
I execute the following code get the error "Couldn't resolve host" but i use the >> curl http://curl.haxx.se no problem. What u think the problemn is ??
#include "stdafx.h"
#include "stdio.h"
#include "c:\cURL\curl_exe\src\curl.h"
#include "c:\cURL\curl_exe\src\types.h"
#include "c:\cURL\curl_exe\src\easy.h"
int main(int argc, char **argv)
{
CURL *curl;
CURLcode res;
FILE *headerfile;
headerfile = fopen("dumpit", "w");
curl = curl_easy_init();
if(curl) {
// what call to write:
curl_easy_setopt(curl, CURLOPT_URL, "curl.haxx.se");
curl_easy_setopt(curl, CURLOPT_WRITEHEADER, headerfile);
res = curl_easy_perform(curl);
// always cleanup
curl_easy_cleanup(curl);
}
}
Regards,
Chen Fock Siong
19-Feb-2001
Received on 2001-02-19