How to get raw request data in PHP?

I am designing a SERVER that works as a proxy server in PHP. It simply redirects the request from the client to the server and responds to the response from the server back to the client.

I want to read client RAW request data. It may include POST / GET / multipart / form-data with FILES uploaded. How to do it?

Regards, Sanket

+3
source share
1 answer
file_get_contents("php://input");

You can see more options http://php.net/manual/en/wrappers.php.php ("Options")

+10
source

All Articles