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.data
You are trying to save an object, using file_put_contents. While data
parameter this function "Can be either a string, an array or a stream resource"
http://php.net/manual/en/function.file-put-contents.php
Look at this example:
It parses json correctly, but doesn't save anything as well, because php doesn't know, how to serialize $phpObj object.
You need to save raw JSON string:
Then you can read the file and parse it if necessary.