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