I write a program with libcurl.
#include <stdio.h>
#include <string.h>
#include <curl/curl.h>
#define URL_MAX 256
int main(int argc, char *args[])
{
CURL *curl;
CURLcode res;
curl_global_init(CURL_GLOBAL_DEFAULT);
curl = curl_easy_init();
curl_easy_setopt(curl, CURLOPT_URL, args[1]);
curl_easy_perform(curl);
curl_easy_cleanup(curl);
return 0;
}
$ gcc tinyCurl.c
$ gcc curl-config --libs
tinyCurl.c
$ ./a.out http://example.com/
I examine search it google but I can't find .
I want to store char[] not stdout.
Is a question of the beginner thanking you in advance