How to get request content (body) in PHP?
Use file_get_contents("php://input")
(manual).
In PHP older than 7.0 you could also use $HTTP_RAW_POST_DATA
(depending on always_populate_raw_post_data setting).
Try this
$xml = file_get_contents('php://input');
From the manual:
php://input is a read-only stream that allows you to read raw data from the request body.