1CURLOPT_FTP_ACCOUNT(3) curl_easy_setopt options CURLOPT_FTP_ACCOUNT(3)
2
3
4
6 CURLOPT_FTP_ACCOUNT - set account info for FTP
7
9 #include <curl/curl.h>
10
11 CURLcode curl_easy_setopt(CURL *handle, CURLOPT_FTP_ACCOUNT, char *ac‐
12 count);
13
15 Pass a pointer to a null-terminated string (or NULL to disable). When
16 an FTP server asks for "account data" after user name and password has
17 been provided, this data is sent off using the ACCT command.
18
19 The application does not have to keep the string around after setting
20 this option.
21
23 NULL
24
26 FTP
27
29 CURL *curl = curl_easy_init();
30 if(curl) {
31 curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/foo.bin");
32
33 curl_easy_setopt(curl, CURLOPT_FTP_ACCOUNT, "human-resources");
34
35 ret = curl_easy_perform(curl);
36
37 curl_easy_cleanup(curl);
38 }
39
41 Added in 7.13.0
42
44 Returns CURLE_OK if the option is supported, CURLE_UNKNOWN_OPTION if
45 not, or CURLE_OUT_OF_MEMORY if there was insufficient heap space.
46
48 CURLOPT_USERNAME(3), CURLOPT_PASSWORD(3),
49
50
51
52libcurl 7.76.1 November 04, 2020 CURLOPT_FTP_ACCOUNT(3)