12345678910111213141516171819202122232425262728293031323334353637 |
- #include <stdio.h>
- #include <curl/curl.h>
- int main(void)
- {
- CURL *curl;
- CURLcode res;
- char *postthis="moo mooo moo moo";
- curl = curl_easy_init();
- if(curl) {
- curl_easy_setopt(curl, CURLOPT_URL, "http://posthere.com");
- curl_easy_setopt(curl, CURLOPT_POSTFIELDS, postthis);
-
- curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, strlen(postthis));
- res = curl_easy_perform(curl);
-
- curl_easy_cleanup(curl);
- }
- return 0;
- }
|