I'm trying to record data that is being posted to my server to a text file. An example of the data that is being sent to my server is located here:
http://dev.datasift.com/docs/push/sample-output-file-based-connectors
It says on that page:
"For all file-based connectors, the payload is a JSON object containing metadata plus an array containing the JSON objects from your stream."
I have the following PHP at the location I have datasift sending data to:
<?php
$myFile = "testFile.txt";
$phpObj = json_decode($_POST['json']);
file_put_contents($myFile,$phpObj);
echo '{ "success": true }';
?>
I know data is being sent, but nothing is being recorded in my text file. It's just blank every time. I have no idea where to go from here unfortunately. Any ideas?