$d365_url = 'https://businesscentral.dynamics.com/';
$username = 'xxxxxxxxxx';
$password = 'xxxxxxxxxx';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $d365_url . 'yyyyyyyyy'); //not sure what yyyyyyyy should be????
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
curl_setopt($ch, CURLOPT_USERPWD, /$username:$password/);
$response = curl_exec($ch);
curl_close($ch);