Journal & Notebook

SharePoint Document Library Uploads Via PHP/Curl

6 years agoOctober 17th, 2012

My quest to upload files from PHP into SharePoint 2010 Document Libraries eluded me until I came across instructions to simply use HTTP PUT requests to send the files with Basic Authentication. Most examples were done with C# or perl. I figured it would be meaningful to some if I shared my solution with PHP using curl. Hope that this helps someone out there.

First Step:

Enable Basic Authentication in IIS on the SharePoint server.

Note: Make sure you disable Basic Authentication for the _layouts folder in IIS. Otherwise, you'll get a basic authentication on Firefox for every page because of image loads.