CURL * curl; curl_global_init(CURL_GLOBAL_ALL); CURLcode res; string UserName = pcobj.getUserName(); string request = "UserName=" + UserName; string url = "http://localhost:8084/project/Files.php"; curl = curl_easy_init(); if (curl) { curl_easy_setopt(curl, CURLOPT_URL, url.c_str()); curl_easy_setopt(curl, CURLOPT_POSTFIELDS, request.c_str()); 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); } curl_global_cleanup();
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)