CURLOPT_FTP_ACCOUNT.3 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. .\" generated by cd2nroff 0.1 from CURLOPT_FTP_ACCOUNT.md
  2. .TH CURLOPT_FTP_ACCOUNT 3 "2025-01-17" libcurl
  3. .SH NAME
  4. CURLOPT_FTP_ACCOUNT \- account info for FTP
  5. .SH SYNOPSIS
  6. .nf
  7. #include <curl/curl.h>
  8. CURLcode curl_easy_setopt(CURL *handle, CURLOPT_FTP_ACCOUNT, char *account);
  9. .fi
  10. .SH DESCRIPTION
  11. Pass a pointer to a null\-terminated string (or NULL to disable). When an FTP
  12. server asks for "account data" after username and password has been provided,
  13. this data is sent off using the ACCT command.
  14. The application does not have to keep the string around after setting this
  15. option.
  16. .SH DEFAULT
  17. NULL
  18. .SH PROTOCOLS
  19. This functionality affects ftp only
  20. .SH EXAMPLE
  21. .nf
  22. int main(void)
  23. {
  24. CURL *curl = curl_easy_init();
  25. if(curl) {
  26. CURLcode res;
  27. curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/foo.bin");
  28. curl_easy_setopt(curl, CURLOPT_FTP_ACCOUNT, "human-resources");
  29. res = curl_easy_perform(curl);
  30. curl_easy_cleanup(curl);
  31. }
  32. }
  33. .fi
  34. .SH AVAILABILITY
  35. Added in curl 7.13.0
  36. .SH RETURN VALUE
  37. Returns CURLE_OK if the option is supported, CURLE_UNKNOWN_OPTION if not, or
  38. CURLE_OUT_OF_MEMORY if there was insufficient heap space.
  39. .SH SEE ALSO
  40. .BR CURLOPT_PASSWORD (3),
  41. .BR CURLOPT_USERNAME (3)