ホームページ >バックエンド開発 >PHPチュートリアル >libcurlを使用したFTP over SSLについて教えてください
libcurl
<br /> code = curl_easy_setopt(ftp_handle, CURLOPT_URL, "ftp:127.0.0.1:990/");<br /> code = curl_easy_setopt(ftp_handle, CURLOPT_USERNAME, "username");<br /> code = curl_easy_setopt(ftp_handle, CURLOPT_PASSWORD, "password");<br /> code = curl_easy_setopt(ftp_handle, CURLOPT_DIRLISTONLY, 1L);<br /> <br /> /*<br /> code = curl_easy_setopt(ftp_handle, CURLOPT_FTP_SSL_CCC, CURLFTPSSL_CCC_NONE);<br /> code = curl_easy_setopt(ftp_handle, CURLOPT_SSL_VERIFYPEER, 1L);<br /> code = curl_easy_setopt(ftp_handle, CURLOPT_SSL_VERIFYHOST, 2L);<br /> code = curl_easy_setopt(ftp_handle, CURLOPT_FTPSSLAUTH, CURLFTPAUTH_TLS);<br /> code = curl_easy_setopt(ftp_handle, CURLOPT_SSLVERSION, CURL_SSLVERSION_TLSv1);<br /> */<br /> <br /> /*<br /> code = curl_easy_setopt(ftp_handle, CURLOPT_TLSAUTH_TYPE, 1L);<br /> code = curl_easy_setopt(ftp_handle, CURLOPT_TLSAUTH_USERNAME, "tms");<br /> code = curl_easy_setopt(ftp_handle, CURLOPT_TLSAUTH_PASSWORD, "ewstms");<br /> */<br /> <br /> /*<br /> code = curl_easy_setopt(ftp_handle, CURLOPT_USE_SSL, CURLUSESSL_ALL);<br /> */<br /> <br /> code = curl_easy_setopt(ftp_handle, CURLOPT_VERBOSE, 1L);<br /> <br /> CURLcode res = curl_easy_perform(ftp_handle);<br />