2

I am using the library https://github.com/thybag/PHP-SharePoint-Lists-API for accessing the whole lists in SharePoint using php.

I am able to get a connection with SharePoint.I am giving the code below used by me

<?php

require_once('SharePointAPI.php');
require_once('SoapClientAuth.php');
$useNtlm=TRUE;
$sp = new SharePointAPI('[email protected]', 'Sample@nt1', 'https://sample-public.sharepoint.com/_vti_bin/Lists.asmx?WSDL',TRUE);


$sp->setReturnType('object');

$data = $sp->getLists();
var_dump($data);

?>

Here I am not able to get connection also .

It may be maintained or configured incorrectly.

I will be thankful if I solve the problem using the same above library.

1

1 Answer 1

2

Just to say, if you are using SharePoint online, it uses a different authentication method to standard SharePoint. I've now added support for it in the latest version of the library so it may be worth having a try with something like:

use Thybag\SharePointAPI;
$sp = new SharePointAPI('<username>', '<password>', '<path_to_WSDL>', 'SPONLINE');

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.