Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.1k views
in Technique[技术] by (71.8m points)

how to connect sharepoint with php

Do anyone know how to integrate Sharepoint and Php. I am trying to develop php app which can connect to Sharepoint.In particular since basically I am website developer, I want my all websites to be connected with Sharepoint. So, simply I want to create Php app such that it works for all the websites. I don't know is it possible or not but I want to give it a try but don't know how to proceed.

Any idea/suggestions is welcome.

Thanks in advance.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Try this API

In SharePoint

Download the WSDL. Usually at this location: <sharepoint.url>/subsite/_vti_bin/Lists.asmx?WSDL

Download the API

Make sure to save both SoapClientAuth.php and SharePointAPI.php

In PHP

// 0: include api in your php script.
require_once('SharePointAPI.php');

// 1: connect to SharePoint
$sp = new SharePointAPI('<username>', '<password>', '<path_to_WSDL>');

// 2: read a list
$listContents = $sp->read('<list_name>'); 

// 3: now you have a 2-D array to work with in PHP
foreach($listContents as $item)
{
    var_dump($item);
}

With this API, you can also query, update, create, delete lists, query list metadata


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

2.1m questions

2.1m answers

60 comments

56.8k users

...