libcUrl 简单使用(一)

#include "stdafx.h"
#include "curl/curl.h"


int main(int argc, char* argv[])
{

	CURL *curl;
	CURLcode res;
	curl = curl_easy_init();
	if(curl)
	{
		curl_easy_setopt(curl, CURLOPT_URL, 
			"http://example.com");
		res = curl_easy_perform(curl);
		
		if(res != CURLE_OK)
			fprintf(stderr, "curl_easy_perform() failed: %s\n",
              curl_easy_strerror(res));

		curl_easy_cleanup(curl);
	}
	return 0;


}

附件下载:

http://download.csdn.net/detail/u012607841/7314675

你可能感兴趣的:(C/C++)