PHP: HTTP Request Body

php://input is a read-only stream that allows you to read raw data from the request body. php://input is not available in POST requests with enctype="multipart/form-data" if enable_post_data_reading option is enabled.

$text = file_get_contents('php://input');
$json = file_get_contents('php://input');
$xml = file_get_contents('php://input');

References:


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *