I need some hep with the HTTP integration , I have followed the youtube video. i have also read most of the posts of the http integrations . there is a lot of discussion around REST and MQTT as a use to collect the data from the TTN publish. However i woul d need to keep it a bit simpler due to the limitations of the server i am working with to retrieve the data.
So i have written some PHP code below to catch the data that is being sent to HTTP endpoint. however looking at the documentation on HTTP integration (https://www.thethingsnetwork.org/docs/applications/http/#uplink) the data is no where near the construct i expected
I am not a PHP expert , so some help will be greatly appreciated.
<?php $filedta="ttndata/ttndata.txt"; $ttndtajs=" "; $nxt="\r\n"; // receive the JSON Post data $ttndtajs = json_decode( file_get_contents( 'php://input' ), true ); file_put_contents($filedta,$ttndtajs, FILE_APPEND); //creating newline in text document as //concatenation does not seem to work file_put_contents($filedta, $nxt, FILE_APPEND); ?>
My file is capturing the following
I am not sure what is the next step here