REST API POST data retrieval

Hello, I am trying to retrieve post data from KoBoToolbox REST API to a PHP file. It is showing successful in REST service when submitting a form. REST API endpoint URL is like http://xyz.com/abc.php. In that PHP file trying to retrieve last submitted data.
In PHP file, trying to write a test string to mytext.txt file to check whether EndPoint resource (abc.php) is calling or not. After submitting a form from Kobotoolbox, able to write into mytest.txt but how can i retrieve/write last submitted data to text file.
$_POST, file_get_contents(‘php://input’) are retrieving a empty string. Please help to resolve issue. Thank you.