I'm trying to use an online service that requires to read the body of post requests at a callback url (webhook).
However I'm not familiar with http requests and unable to read the received data.
I'm using file_get_contents('php://input') to retrieve the body and store the result in a text file :
file_put_contents("log/test.txt", file_get_contents('php://input'));
I received data look like this in notepad++ (weird characters) :
Any idea on what's happening here ?
EDIT : Full code
<head>
<meta charset="UTF-8">
</head>
<body>
<?php
require_once dirname(__FILE__).'/db_functions.php';
file_put_contents("log/test.txt", file_get_contents('php://input'));
?>
</body>
</html>