Risolto utilizzando file_get_contents('php://input') al posto di file_get_contents( $HTTP_RAW_POST_DATA ).