I am designing an Android app that collects the user's information then passes over the data to a website that I am also designing. The website is then supposed to act on the data and once through it should send some result back to the app. How do I send the data collected by the app to my webpage? How do I listen for a response from the website?
e.g How to send this to website ID="234342 QuestionCode="92" TimeStamp="6757172787" I have hosted the website using Webhost000.
So far I've tried https://stackoverflow.com/a/29153585/11118152, https://stackoverflow.com/a/29381874/11118152 among other StackOverflow answers but all of them are deprecated.
The PHP code that I am using to listen for incoming requests is this
<?php
$Response = file_get_contents('php://input');
$logFile = "Texttestresponse.txt";
$log = fopen($logFile, "a");
$test = (string)$Response;
fwrite($log, $test);
fclose($log);
?>