我有php脚本从Android应用程序接收后期数据并进行处理。我需要在收到自己发布的数据时向移动设备发送响应,然后在下面的for循环中处理数据。
$requestBody = file_get_contents('php://input');
echo "success"; // is it correct way to send response?
$msgData=explode("|",$requestBody);
for($mc=1;$mc<count($msgData);$mc++)
{
//Run large algorithms with database transactions
}