Lines Matching +full:curl +full:- +full:examples
1 ---
3 SPDX-License-Identifier: curl
8 - FTP
9 See-also:
10 - CURLOPT_FTP_USE_EPRT (3)
11 - CURLOPT_FTP_USE_EPSV (3)
12 Added-in: 7.1
13 ---
17 CURLOPT_FTPPORT - make FTP transfer active
22 #include <curl/curl.h>
24 CURLcode curl_easy_setopt(CURL *handle, CURLOPT_FTPPORT, char *spec);
29 Pass a pointer to a null-terminated string as parameter. It specifies that the
35 network interface name (under Unix) or just a '-' symbol to let the library
40 a '-' to specify a port range. If the port specified is 0, the operating
47 Examples with specified ports:
50 192.168.1.2:32000-33000
51 curl.se:32123
52 [::1]:1234-4567
56 name resolve operation does **not** use DNS-over-HTTPS even if
59 Using anything else than "-" for this option should typically only be done if
80 CURL *curl = curl_easy_init();
81 if(curl) {
83 curl_easy_setopt(curl, CURLOPT_URL,
84 "ftp://example.com/old-server/file.txt");
85 curl_easy_setopt(curl, CURLOPT_FTPPORT, "-");
86 res = curl_easy_perform(curl);
87 curl_easy_cleanup(curl);
98 CURLE_OK (0) means everything was OK, non-zero means an error occurred, see
99 libcurl-errors(3).