I'm new to Sharepoint integration. I'm hoping to get some answers and direction for the script. The current process requires an XML file to be uploaded into a library, from a separate website.

My initial search led me too: https://msdn.microsoft.com/en-us/library/office/dn769086.aspx as a article to read.

I'm concerned at what is needed, surely the script will need authentication before upload, can I target a specific library. And can this happen from a separate website.

What I would like to do is create the XML, and then upload that XML file into a Sharepoint library on a form submission. The form adds database entries into the external website application, from this data i'll create a XML file which immediately needs to upload to the Sharepoint library.

Many thanks!


You'll definitely want to look at the csom or REST api. You could throw an ajax request from your php upload over to the sharepoint site (if its accessible). You'll definitely have to authenticate. How you do that depends on what type of auth you use on SP. Are you wanting to upload the xml file as an attachment, or upload the xml file as data? If you're uploading data you might choose to skip xml altogether and just send the data over in the format sharepoint needs.

I did something similar, only I wanted a wall of protection as SP is our internal site. So I had the form send to email and then that person uploaded the attached csv. This may not be a good option for you however depending on how many entries you may receive. In our case it was only 1-2 a week. I provided an option so they could take the csv and drop it on an upload spot. Then the script parsed the csv to the appropriate sharepoint list fields.

So are you stuck with xml? DO you want a direct connection from your php server to your SP server?

  • Hey @Casey-Govero thanks for the message! Yeah just completely in the dark here. I can build the XML file, what the script needs to do is authenticate, and then upload the xml file itself into a library on sharepoint. There are other processes that will pick it up from there. We're expecting many files to come through. A direct connection in, to upload files and also write over files will be the exact thing I need. – Markvdb Oct 31 '16 at 13:46

@Markvdb you can visit this link here I have explained how you can upload file to shairepoint in PHP


  • While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - From Review – Gaurravs Jul 21 '17 at 11:28
  • For this, you need to follow the couple of steps which we can not write here, so that is why I post the link here. do not worry this page never changed – Ravi Jul 21 '17 at 11:33
  • If link goes off some time. this link will be no longer be helpful. You can include part of the post which helps understand the solution – Gaurravs Jul 21 '17 at 12:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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