Connecting to WebDAV with PHP? Connecting to WebDAV with PHP? php php

Connecting to WebDAV with PHP?


Yes, you would connect to a WebDAV server like any other HTTP server but you will have to talk WebDAV.

But, since there are enough difference between HTTP and WebDAV that you need to handle yourself, you are better off using a WebDAV client or a library.

WebDAV is an extended HTTP lingo with additional verbs like PROPFIND, PROPPATCH, REPORT etc. It also provides support for querying, setting and fetching meta-properties of a webdav resource via the PROPFIND and PROPPATCH using xml payload. While many aspects should be similar to HTTP notions. There are a number of small changes / nuances where it differs from HTTP.

This above brief introduction to WebDAV can be a bit misleading so read the details on WebDAV RFC and Info.

See the following as a typical client implementation: