I am using a third party API in the system which post xml data to my URL which I get and process the xml. They are saying server has to reply back as Accepted. I am having trouble in this part.
Example:
if ( $_SERVER['REQUEST_METHOD'] === 'POST' )
{
//Read the xmlinput and write to the file
$xml = file_get_contents('php://input');
//...processing the xml and storing to my SQL...
//How to reply back as '<xml>Accepted</xml>'
}
Please need help.I am able to process xml file and get the data but having sending them back xml reply.
Note:API post results to URL. My server should respond with "Accepted" if successful