Just created a Dynamics365 account. I use both PHP and C# to access.
How do I connect and read a table using PHP. From what I see it requires the following:
// Settings for accessing d365 services
$d365_url = 'https://businesscentral.dynamics.com/';
$username = 'xxxxxxxxxx';
$password = 'xxxxxxxxxx';
Then
// Creating HTTP request
$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(
Then
// Setting up basic authentication
curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
curl_setopt($ch, CURLOPT_USERPWD, /$username:$password/);
// Executing HTTP request
$response = curl_exec($ch);
curl_close($ch);
I end up getting and error:
not a valid cURL handle resource
I think the 'yyyyyyyy' needs to be supplied but I don't know what is valid?