#include <stdio.h>
#include <string.h>
#include <curl/curl.h>
#include <curl/easy.h>
int main(void)
{
CURL *curl;
CURLcode res;
struct curl_slist *host = NULL;
host = curl_slist_append(NULL, "groad.net:80:192.168.1.102");
curl = curl_easy_init();
if (curl) {
curl_easy_setopt(curl, CURLOPT_RESOLVE, host);
curl_easy_setopt(curl, CURLOPT_URL, "http://groad.net/index.html");
res = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
curl_slist_free_all(host);
return (int)res;
}
欢迎光临 曲径通幽论坛 (http://www.groad.net/bbs/) | Powered by Discuz! X3.2 |