Untitled

mail@pastecode.io avatar
unknown
plain_text
6 months ago
568 B
1
Indexable
Never
int main() {
    CURL *curl;
    CURLcode res;

    curl_global_init(CURL_GLOBAL_DEFAULT);

    curl = curl_easy_init();
    if (curl) {
        // Açmak istediğiniz URL'yi belirtin
        curl_easy_setopt(curl, CURLOPT_URL, "http://www.example.com");

        // URL'yi açın
        res = curl_easy_perform(curl);
        if (res != CURLE_OK)
            std::cerr << "curl_easy_perform() failed: " << curl_easy_strerror(res) << std::endl;

        // CURL örneğini temizleyin
        curl_easy_cleanup(curl);
    }

    curl_global_cleanup();

    return 0;
}