From 1fe52bad951b67390948a0beec2c1ae9abd89c6f Mon Sep 17 00:00:00 2001 From: IvanovDA Date: Sun, 26 May 2024 16:30:19 +0300 Subject: [PATCH] =?UTF-8?q?code:=20=D0=B4=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D0=B5=20=D0=BA=D0=BE=D0=B4=D0=B0=20=D0=B1?= =?UTF-8?q?=D0=B8=D0=B1=D0=BB=D0=B8=D0=BE=D1=82=D0=B5=D0=BA=D0=B8=20curl?= =?UTF-8?q?=20=D0=B4=D0=BB=D1=8F=20=D0=B7=D0=B0=D0=B3=D1=80=D1=83=D0=B7?= =?UTF-8?q?=D0=BA=D0=B8=20=D1=84=D0=B0=D0=B9=D0=BB=D0=BE=D0=B2=20=D0=B8?= =?UTF-8?q?=D0=B7=20=D1=81=D0=B5=D1=82=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cs-project3.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/cs-project3.cpp b/cs-project3.cpp index 3698e01..5a9c55e 100644 --- a/cs-project3.cpp +++ b/cs-project3.cpp @@ -34,9 +34,14 @@ input_data(istream& inn, bool promt) { int main(int argc, char* argv[]) { if (argc > 1) { - for (int i = 0; i < argc; i++) { - cout << "argv ["<< i <<"] = " << argv[0] << 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); } + curl_easy_cleanup(curl); return 0; } curl_global_init(CURL_GLOBAL_ALL);