Dear Marc,
chatgpt response, not sure if it may help:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <curl/curl.h>
// Callback function to receive HTTP response data
size_t WriteCallback(void *contents, size_t size, size_t nmemb, void *userp) {
  size_t realsize = size * nmemb;
  char *response = (char *)userp;
  // Append the received data to the response buffer
  memcpy(response, contents, realsize);
  return realsize;
}
int main(void) {
  CURL *curl;
  CURLcode res;
  curl_global_init(CURL_GLOBAL_DEFAULT);
  curl = curl_easy_init();
  if (curl) {
    char url[200];  // Adjust buffer size if necessary
    char vatNumber[20];  // The VAT number you want to check
    char responseBuffer[1024];  // Buffer to store the response data
    // Construct the URL for VIES VAT number validation
    sprintf(url, "http://ec.europa.eu/taxation_customs/vies/vatResponse.html?&memberStateCode=&number=%s&traderName=&traderCompanyType=&traderStreet=&traderPostcode=&traderCity=&requesterMemberStateCode=&requesterNumber=&action=check&check=Verify",
        vatNumber);
    // Set the URL
    curl_easy_setopt(curl, CURLOPT_URL, url);
    // Set the write callback function to handle the response data
    curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, WriteCallback);
    curl_easy_setopt(curl, CURLOPT_WRITEDATA, responseBuffer);
    // Perform the HTTP request
    res = curl_easy_perform(curl);
    if (res != CURLE_OK) {
      fprintf(stderr, "curl_easy_perform() failed: %s\n", curl_easy_strerror(res));
    } else {
      // Print the received response
      printf("Response:\n%s\n", responseBuffer);
    }
    // Cleanup
    curl_easy_cleanup(curl);
  }
  curl_global_cleanup();
  return 0;
}