如何通过安全的 FTP SSL 协议发送文件 [英] How to Send File over secure FTP SSL Protocol

查看:57
本文介绍了如何通过安全的 FTP SSL 协议发送文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我很感激能在这个主题上提供的任何帮助.在在线注册结束时,我正在获取客户数据(几个字段),将它们放入一个 CSV 文件中并尝试通过 SSL 协议提交给另一个客户端,但不知道这是如何完成的.我还将信息存储在本地数据库中,希望过程有点相似.

I appreciate any help that can be offered on the subject. At the end of an online enrollment, I am taking customer data (several fields), putting them in a CSV file and trying to submit to another client over SSL protocol but have no idea how this is done. I am also storing the information on a local database and am hoping the process is somewhat similar.

我已经收到了从 php.net 查看 SSH2 说明的链接 SSN2

I have already been sent links to view the SSH2 instructions from php.net SSN2

但说实话,这对我来说就像读中文.我不明白这些说明,也不打算安装任何扩展、修改 PHP.ini 文件或任何类似的东西(特别是因为我们不拥有正在发送信息的服务器).

but to be honest this is like reading Chinese to me. I do not understand the instructions and am not looking to install any extensions, modify the PHP.ini file or anything of the sort (especially since we do not own the server the information is being sent through).

是否有一种简单、安全的方式将此文件传输到提供给我们的 SSL 协议?

Is there a simple, secure way of transmitting this file to the SSL protocol provided to us?

谢谢!

推荐答案

我设法使用 php 通过 SSL 进行 ftp 的唯一方法是使用 php 的 exec() 函数来执行 curl 命令.PHP 的 curl 库不起作用,因为当时不存在 skip-pasv-ip 选项,这是绝对必需的.类似的东西:

The only way I've managed to do ftp over SSL using php was to use php's exec() function to execute a curl command. PHP's curl library would not work because at the time, the skip-pasv-ip option did not exist and it was something that was absolutely required. Something like:

curl --user <username:password> --disable-epsv --ftp-pasv --ftp-skip-pasv-ip --ftp-ssl --sslv2  --cert <path/to/certificate> -T <path/to/uploadfile> <hostname>

您可能需要修改 curl 选项以满足您的需要.

You may need to modify the curl options to suit your needs.

这篇关于如何通过安全的 FTP SSL 协议发送文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆