Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.2k 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 Reply

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

1.4m articles

1.4m replys

5 comments

57.0k users

...