Friday, June 3, 2016

PHP: External Service Sends JSON Format to your API Method

If you have an external service sending information over to your PHP server as JSON or XML, you can capture the response as follows:

$postResult = file_get_contents('php://input');
$payload = json_decode($postResult, true);

No comments:

Post a Comment