$xmldata ='
<mail>
<receive>you</receive>
<sender>Surit</sender>
<subject>Call me</subject>
<message>XYZ</message>
</mail>
';
$url = "your url";
$curlConn = curl_init($url);
curl_setopt($curlConn, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($curlConn, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($curlConn, CURLOPT_HTTPHEADER, array("Content-Type: application/atom+xml"));
curl_setopt($curlConn, CURLOPT_POST, 1);
curl_setopt($curlConn, CURLOPT_POSTFIELDS,$xmldata);
curl_setopt($curlConn, CURLOPT_RETURNTRANSFER, 1);
$ret = curl_exec($curlConn);
Receive xml in post :
$dataPOST = trim(file_get_contents('php://input'));
$xml = simplexml_load_string($dataPOST);
0 Comment(s)