From 246858e6968305939c30f3fd995512d5f94cbafa Mon Sep 17 00:00:00 2001 From: "Dmitriy (BerezhkovDA)" Date: Sat, 11 May 2024 21:10:19 +0300 Subject: [PATCH] =?UTF-8?q?lab4=20=D0=B7=D0=B0=D0=B3=D1=80=D1=83=D0=B7?= =?UTF-8?q?=D0=BA=D0=B0=20=D1=84=D0=B0=D0=B9=D0=BB=D0=B0=20=D1=87=D0=B5?= =?UTF-8?q?=D1=80=D0=B5=D0=B7=20curl?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sem2_lab1/sem2_lab1.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/sem2_lab1/sem2_lab1.cpp b/sem2_lab1/sem2_lab1.cpp index 37ed956..4ba33d2 100644 --- a/sem2_lab1/sem2_lab1.cpp +++ b/sem2_lab1/sem2_lab1.cpp @@ -30,7 +30,14 @@ Input input_data(istream& in,bool prompt) int main(int argc, char* argv[]) { if (argc > 1) { - for (int i = 0; i < argc; i++) cout << "argv[" << i << "] = " << argv[i] << endl; + CURL* curl = curl_easy_init(); + if (curl) { + CURLcode res; + curl_easy_setopt(curl, CURLOPT_URL, argv[1]); + res = curl_easy_perform(curl); + curl_easy_cleanup(curl); + cout << res <