简体   繁体   English

使用PHP如何在不同服务器上的脚本之间安全地传递变量

[英]Using PHP how to pass variables securely between scripts on different servers

I have a login form on one server, server A. Hosted on another server, server B, I have a script to check the data and return the result. 我在一台服务器A上有一个登录表单。托管在另一台服务器B上,我有一个脚本来检查数据并返回结果。 Server B sends the result to server A, but I don't want to pass the result back in the URL or headers with various redirects, because people can spoof a "true/false" to change the result of the login. 服务器B将结果发送到服务器A,但是我不希望将结果通过各种重定向传递回URL或标头中,因为人们可以欺骗“ true / false”来更改登录结果。

eg 例如

I can't use HTTPS/SSL as my web host does not support it for free. 我无法使用HTTPS / SSL,因为我的网络主机不免费支持它。

You could set up an ssh tunnel between the servers and have the web server on B listen only on localhost:Bs_tunnel_port, while A connects to its localhost:As_tunnel_port. 您可以在服务器之间建立ssh隧道,并使B上的Web服务器仅在localhost:Bs_tunnel_port上侦听,而A连接到其localhost:As_tunnel_port。

Or get that SSL thing going... ;) 还是让SSL顺利进行;;)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM