$request = '<?xml version="1.0" encoding="UTF-8" ?><DeliveryRequest Number="0000033876WO" Date="2019-04-29T11:22:43" Account="2JewP******NCbIIbKAw2" Secure="4a3ac********bc5f" OrderCount="1"><Order Number="1520" SendCityPostCode="350000" RecCityPostCode="350000" RecipientName="Герусов Александр Валерьевич" RecipientEmail="gerusov14@mail.ru" Phone="89615096005" TariffTypeCode="136" DeliveryRecipientCost="137" DeliveryRecipientVATRate="VATX" DeliveryRecipientVATSum="0" SellerName="ИП Волженин Е.Г." SellerAddress="Ленинградская обл, Всеволожский р-н, Пос. Лесное, дом № 18, кв.6"><Address PvzCode="KSD5"/><Package Number="1" BarCode="krd61927-1" Weight="1000"><Item WareKey="158308" Cost="790" Payment="790" PaymentVATRate="VATX" PaymentVATSum="0" Weight="1000" Amount="1" Comment="Кронштейн для телевизора Ultramounts UM 814F черный"/></Package></Order></DeliveryRequest>';
$host_api = 'https://integration.cdek.ru/new_orders.php';
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $host_api);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl, CURLOPT_POSTFIELDS, ['xml_request' => $request]);
$response = curl_exec($curl);
if ($response === false) {
echo "cURL Error: " . curl_error($curl);
}
$sent_headers = curl_getinfo($curl, CURLINFO_HEADER_OUT);
curl_close($curl);
echo "<pre>";
var_dump($response);
echo "</pre>";