5

I have a script called api.php on my server. I call it from other server using POST request. Is there any way to get in my api.php raw contents of POST request?

Tom Smykowski
  • 25,487
  • 54
  • 159
  • 236

1 Answers1

12

use the following code

$data = file_get_contents('php://input');
Ahmed Aman
  • 2,373
  • 1
  • 19
  • 33