user@domain.com Mr Joe Bloggs user2@domain.com Mr Kis Ja '; $c = curl_init(); curl_setopt($c, CURLOPT_URL, $url); curl_setopt($c, CURLOPT_RETURNTRANSFER, true); curl_setopt($c, CURLOPT_HEADER, true); curl_setopt($c, CURLOPT_HTTPHEADER, array('Content-Type: application/xml','apikey:'.$apikey, 'Content-length: '.strlen($xml))); curl_setopt($c, CURLOPT_POST, true); curl_setopt($c, CURLOPT_POSTFIELDS, $xml); curl_setopt($c, CURLOPT_TIMEOUT, (int)30); $xmlResponse = curl_exec($c); curl_close ($c); echo '
Output ::
'.$xmlResponse; ?>