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?
The preferred method for accessing the raw POST data is php://input . $HTTP_RAW_POST_DATA is not available with enctype="multipart/form-data" . This feature was DEPRECATED in PHP 5.6. 0, and REMOVED as of PHP 7.0.
This method performs a raw HTTP request, allowing you as a flow builder to control all aspects of the HTTP request. This allows a flow to call an XML service or call an HTML service, or a number of other advanced usages.
use the following code
$data = file_get_contents('php://input');
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With