3

I am designing a server which works as a proxy server in PHP. It just forwards the request from the client to server and replies the response from the server back to the client.

I want to read the raw request data of the client. It may include POST, GET, or multipart/form-data with files to be uploaded. How can I do it?

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Sanket Sahu
  • 8,468
  • 10
  • 51
  • 65

1 Answers1

10
file_get_contents("php://input");

You can see more options in php:// ("Options").

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
cutsoy
  • 10,127
  • 4
  • 40
  • 57