douruobokui58233 2015-02-06 14:43 采纳率: 0%
浏览 24

来自主机A的请求文件,该文件是通过主机B上的PHP创建的

I have encrypted .txt files located on my server (Host B). Let's say what they are encrypted with is called ENCRYPTION #1.

A user (Host A) wants to request a specific file from my server by sending over information such as filename and username. Before he should get the requested file there are a few steps to do as he can not take any use of the file in the current state (ENCRYPTION #1).

What has to be done is:

  1. Open up the requested file and save the content in a variable.
  2. Decrypt the content of the variable via PHP (ENCRYPTION #1 to plain text).
  3. Encrypt the plain text again but this time using ENCRYPTION #2 (Plain text to ENCRYPTION #2).
  4. Create a new .txt file with the content encrypted with ENCRYPTION #2.
  5. Send the now with ENCRYPTION #2 encrypted .txt file back to Host A as requested.

I have the encrypting scripts and everything already done but what I do not have an idea of is how to run the .txt file through a PHP script on Host B before sending it back to Host A.

Could anyone here point me to a direction that helps me get this done or show me some kind of example?

  • 写回答

0条回答 默认 最新

    报告相同问题?