Your IP : 216.73.216.170
<?php
declare(strict_types=1);
$headers = array(
0 => 'Method: POST',
1 => 'Connection: Keep-Alive',
2 => 'User-Agent: PHP-SOAP-CURL',
3 => 'Content-Type: text/xml; charset=utf-8',
4 => 'SOAPAction: "http://schemas.microsoft.com/exchange/services/2006/messages/FindItem"',
5 => 'Expect: 100-continue',
);
$location = 'https://mail.rusgeology.ru/EWS/Exchange.asmx';
$options = array(
CURLOPT_SSL_VERIFYPEER => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER =>
array(
0 => 'Method: POST',
1 => 'Connection: Keep-Alive',
2 => 'User-Agent: PHP-SOAP-CURL',
3 => 'Content-Type: text/xml; charset=utf-8',
4 => 'SOAPAction: "http://schemas.microsoft.com/exchange/services/2006/messages/FindItem"',
5 => 'Expect: 100-continue',
),
CURLOPT_HTTP_VERSION => 2,
CURLOPT_POST => true,
CURLOPT_HTTPAUTH => CURLAUTH_NTLM,
CURLOPT_USERPWD => 'SmartOffice:%?3%YHbW%LK7',
CURLE_ABORTED_BY_CALLBACK => true,
CURLE_TOO_MANY_REDIRECTS => true,
CURLOPT_FORBID_REUSE => false,
CURLOPT_POSTFIELDS => '<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:ns2="http://schemas.microsoft.com/exchange/services/2006/messages"><SOAP-ENV:Header><ns1:RequestServerVersion Version="Exchange2016"/></SOAP-ENV:Header><SOAP-ENV:Body><ns2:FindItem Traversal="Shallow"><ns2:ItemShape><ns1:BaseShape>AllProperties</ns1:BaseShape></ns2:ItemShape><ns2:CalendarView MaxEntriesReturned="90" StartDate="2020-11-09T15:17:54+03:00" EndDate="2020-12-10T15:17:54+03:00"/><ns2:ParentFolderIds><ns1:DistinguishedFolderId Id="calendar"><ns1:Mailbox><ns1:EmailAddress>smartofficetest1@rusgeology.ru</ns1:EmailAddress></ns1:Mailbox></ns1:DistinguishedFolderId></ns2:ParentFolderIds></ns2:FindItem></SOAP-ENV:Body></SOAP-ENV:Envelope>
',
);
$curl = curl_init($location);
curl_setopt_array($curl, $options);
$response = curl_exec($curl);
echo $response;