ChannelAdvisor GetOrderList Nusoap / PHP Example

I haveĀ  been working with Channel Advisor GetorderLisst API call to get order details between a specific date, below code will help you to get correct data from channeladvisor

require_once('nusoap.php');
$client = new nusoap_client('https://api.channeladvisor.com/ChannelAdvisorAPI/v7/OrderService.asmx?WSDL', true );
$client->namespaces = array(
  'soapenv'=>"http://schemas.xmlsoap.org/soap/envelope/",
  'web'=>"http://api.channeladvisor.com/webservices/",
  'ord'=>"http://api.channeladvisor.com/datacontracts/orders"
); 
$err = $client->getError();
if ($err)
{
//echo 'Constructor error' . $err . '';
}
$accountID='';
$headers = '<web:APICredentials>
<web:DeveloperKey>your key</web:DeveloperKey>
<web:Password>your password</web:Password></web:APICredentials>';
$bodyxml = '<web:GetOrderList>
<web:accountID>your account id</web:accountID>
<web:orderCriteria>
<ord:OrderCreationFilterBeginTimeGMT>2016-02-10T00:00:00</ord:OrderCreationFilterBeginTimeGMT>
  <ord:OrderCreationFilterEndTimeGMT>2016-02-11T00:00:00</ord:OrderCreationFilterEndTimeGMT>
<ord:DetailLevel>Complete</ord:DetailLevel>
</web:orderCriteria>
</web:GetOrderList>';
$result = $client->call('GetOrderList', $bodyxml, false, false,$headers);
//Print out the results
print_r($result);