I am integrating with Http integration through the app-server
However, I can not for the life of me work out how to decode the base64 to a readable format before the data hits the destination.
Here is my php code at end point
<?php header("Content-type: application/json"); $json = file_get_contents("php://input"); $obj = json_decode($json); $decoded = base64_decode(json_encode($obj->data)); $fp = @fopen("data.txt", "a"); fwrite($fp,$decoded); fwrite($fp,"\r\n"); fclose($fp); ?>
It is the part between the app-server and the json I am missing to decode.I wish that when the data is forwarded to the http end point that it automatically displays in readable format, each time data is pushed up.
I have lookd on this forum and search engines, but no luck.
Can anyone provide a step by step on this?