I'm using this library extensively. It has allowed me to use my API endpoints back and forth with no MySQL driver! This is amazing and works perfectly. Its used for synchronizing local files with a remote database and uses a writeback function to write the JSON response back to application and loads data from there after remote database updating.
So PHP and C was required for this, which was easy for me (PHP - 21 years exp).
Thanks a lot!
Just a note, so using WININET is much faster than cURL for some procedures in my code, and that is a slight drawback so some parts are cURL-ready while others are cURL-required. I hope to move everything over to cURL but I first need to find out where the delay overhead is taking place.
Get the version of the library:
void ShowCurlVersion(HWND hwndDlg) {
CURLcode res;
const char* version = curl_version();
int len = MultiByteToWideChar(CP_UTF8, 0, version, -1, NULL, 0);
wchar_t* wVersion = (wchar_t*)malloc((len + 1) * sizeof(wchar_t));
MultiByteToWideChar(CP_UTF8, 0, version, -1, wVersion, len);
MessageBoxW(hwndDlg, wVersion, L"cURL Version", MB_OK);
free(wVersion);
}
CURLcode initRes = curl_global_init(CURL_GLOBAL_DEFAULT);
if (initRes != CURLE_OK) {
MessageBoxW(NULL, L"cURL initialization failed!", L"Error", MB_OK | MB_ICONERROR);
}
ShowCurlVersion(NULL);
curl_global_cleanup();
Im still learning the string formats - wide/narrow so ease up on me lol