将加密数据服务器传输到服务器,在2个PHP脚本之间 [英] Transfering encrypted data server to server, between 2 PHP scripts

查看:215
本文介绍了将加密数据服务器传输到服务器,在2个PHP脚本之间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要将数据从本地服务器上的PHP脚本传输到托管服务器上的远程API(也用PHP编写)。它基本上是一个原始的版本控制系统,我使用HTTP GET和HTTP POST来传输文件和字符串。



我希望连接加密,但我的(共享) )网络主机告诉我我不能使用SSL,因为我无法获得专用的IP地址 - 即使我可以,我也不想再花钱了。



我的问题是:有更好的方法吗?



我考虑过的一些可能性是在PHP中使用mcrypt扩展来加密数据一端是另一端解密。



我还想过TLS,据我所知,它可用于创建没有证书的安全连接? / p>

编辑:请参阅这个问题作为关于OpenPGP,GnuPG和使用MIME转移的后续行动。

解决方案

问题是什么只需使用si如果你真的需要签名,那么对称加密(例如在mcrypt的帮助下)或带有公钥/私钥的东西?另一种可能的解决方案是使用已安装的系统工具并将所有文件放在受密码保护的zip文件中。 (php函数调用system())


I need to transfer data from a PHP script on my local server to a remote API (also written in PHP) on my hosting server. It is basically a primitive version control system, and I use both HTTP GET and HTTP POST to transfer files and strings.

I would like the connection encrypted, but my (shared) web host tells me I can't use SSL because I can't get a dedicated IP address--and even if I could, I don't want to spend any more money on it.

My question is: Is there a better way to do this?

Some possibilities I have considered are using the mcrypt extension in PHP to encrypt data at one end and decrypt at the other.

I also thought of TLS, which--as I understand--can be used to create a secure connection without certificates?

EDIT: Please see this question as a follow up regarding OpenPGP, GnuPG and transfer using MIME.

解决方案

What is the problem with just using a simple symmetric encryption (for example with the help of mcrypt) or something with a public/private key if you really need the signing and all? Another possible solution could be to use installed system tools and put all your files in a password protected zip file. (php function call "system()")

这篇关于将加密数据服务器传输到服务器,在2个PHP脚本之间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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