2

I would like to know how I could write something in "php://input".

Actually I would like to know if I can use this stream like a superglobal.

Example with $_POST

file1: $_POST['param'] = "test";

file2: $param = $_POST['param'];

What I want

file1: ?????????????

file2: $param = file_get_contents('php://input');

Do I need to throw a POST request to from file1 to file2?

Thanks for read me :)

Have a nice day

Michaël S.

Michaël
  • 1,120
  • 1
  • 15
  • 30

1 Answers1

2

php://input is a read-only stream that allows you to read raw data from the request body. (PHP docs)

Maybe, you will find unix-sockets, or shared memory useful?

SlyChan
  • 769
  • 4
  • 15