This is a wget like example of getting the default web page on my local Apache server.
// C BASIC - cURL (wget example)
// gcc cbcurl.c -lcurl -o cbcurl
#include <stdio.h>
#include <curl/curl.h>
#include "cbasic.h"
MAIN
BEGIN_FUNCTION
DIM AS CURL PTR curl;
DIM AS CURLcode res;
curl = curl_easy_init();
IF (curl) THEN
curl_easy_setopt(curl, CURLOPT_URL, "localhost/index.html");
res = curl_easy_perform(curl);
curl_easy_cleanup(curl);
END_IF
RETURN(0);
END_FUNCTION
jrs@laptop:~/C_BASIC/xlate$ gcc cbcurl.c -lcurl -o cbcurl
jrs@laptop:~/C_BASIC/xlate$ ./cbcurl
<html><body><h1>It works!</h1>
<p>This is the default web page for this server.</p>
<p>The web server software is running but no content has been added, yet.</p>
</body></html>
jrs@laptop:~/C_BASIC/xlate$