1--- 2c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al. 3SPDX-License-Identifier: curl 4Title: CURLOPT_FTP_ACCOUNT 5Section: 3 6Source: libcurl 7Protocol: 8 - FTP 9See-also: 10 - CURLOPT_PASSWORD (3) 11 - CURLOPT_USERNAME (3) 12--- 13 14# NAME 15 16CURLOPT_FTP_ACCOUNT - account info for FTP 17 18# SYNOPSIS 19 20~~~c 21#include <curl/curl.h> 22 23CURLcode curl_easy_setopt(CURL *handle, CURLOPT_FTP_ACCOUNT, char *account); 24~~~ 25 26# DESCRIPTION 27 28Pass a pointer to a null-terminated string (or NULL to disable). When an FTP 29server asks for "account data" after username and password has been provided, 30this data is sent off using the ACCT command. 31 32The application does not have to keep the string around after setting this 33option. 34 35# DEFAULT 36 37NULL 38 39# EXAMPLE 40 41~~~c 42int main(void) 43{ 44 CURL *curl = curl_easy_init(); 45 if(curl) { 46 CURLcode res; 47 curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/foo.bin"); 48 49 curl_easy_setopt(curl, CURLOPT_FTP_ACCOUNT, "human-resources"); 50 51 res = curl_easy_perform(curl); 52 53 curl_easy_cleanup(curl); 54 } 55} 56~~~ 57 58# AVAILABILITY 59 60Added in 7.13.0 61 62# RETURN VALUE 63 64Returns CURLE_OK if the option is supported, CURLE_UNKNOWN_OPTION if not, or 65CURLE_OUT_OF_MEMORY if there was insufficient heap space. 66