从C#应用程序读取PHP响应的安全方法 [英] Safe way to read PHP response from C# application

查看:73
本文介绍了从C#应用程序读取PHP响应的安全方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

正如该主题的标题所暗示的那样,我在服务器上安装了一个PHP脚本,当被调用时,该脚本通过将数据回显到页面上而将数据回吐给用户.然后,我使用HttpWebRequest读取PHP脚本放置在页面上的数据.虽然此数据是 加密的,但我希望它根本不会出现在页面上.我认为必须有更好的方法来做到这一点.

As the title of the topic may suggest, I have a PHP script setup on my server that, when called upon, is spitting data back to the user by echoing it back onto the page. I am then using HttpWebRequest to read the data that was put onto the page by the PHP script. While this data is encrypted, I would like for it to not appear on the page at all. I figured there must be a better way to go about doing this.

如果到目前为止我还不清楚我的意图,我正在寻找某种方法来从PHP页面返回数据,以便可以使用HTTPWebResponse检索数据.举例来说,也许我可以发布数据?我对PHP还是很陌生,所以我想问一下这里的专家.

If I have been unclear thus far regarding my intentions, I am looking for some way to return data from a PHP page, so that I can retrieve it using HTTPWebResponse. Perhaps, for example, I could POST the data? I'm quite new to PHP so I figured I'd ask the experts here.

谢谢您的帮助,

埃文

推荐答案

我认为最好的安全方法是在.NET中使用RSA加密.您可以在此处

I think the best safe way is use RSA Encrypt in .NET. You can read and download project at here

这篇关于从C#应用程序读取PHP响应的安全方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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