I use cURL to send request to server this is link: Server Side script for cURL request and i read sended data with file_get_contents('php://input'); but i have some nasty data arround my xml. So i think to use preg_match to select xml only. Something like this:
$arq = file_get_contents('php://input');
$wanted="/\<request\>(.*?)\<\/request\>/i";
preg_match($wanted, $arq, $result);
echo $result;
This is content of $arq:
------------------------------9e2a86ef9445
Content-Disposition: form-data; name="data"
<request>
<session>
<user>exampleuser</user>
<pass>examplepass</pass>
</session>
</request>
------------------------------9e2a86ef9445--
how can I read everything between becouse content inside it is not static, it is dinamic and could be different on separated requests.
Thank you a lot.