PHP WebDAV extension project allows easy access to remote resources with PHP through the DAV protocol.
Installation
This extension requires the Neon library and the related header files.
Neon can be downloaded from: http://www.webdav.org/neon/
Pre-built packages and ports are already available for most operating systems and distributions.
In order to compile and install the PHP WebDAV extension, just follow the standard PECL procedure :
phpize
./configure --enable-dav
make install
On OpenBSD systems, use
env AUTOCONF_VERSION=2.61 phpize
(replace 2.61 with any of the currently installed versions of autoconf on your system)
Basic example
webdav_connect('http://webdav.example.com/dav', 'davuser', 'davpassword');
$a = webdav_get('/my/nice/object.txt');
webdav_put('/your/nice/thing.txt', $data);
webdav_unlink('/unwanted_resource.txt');
webdav_rename('/dir/old_name', '/dir/new_name');
webdav_copy('/dir/orig_dir', '/dir/new_dir', TRUE);
webdav_close();
Named resource example
$res = webdav_connect('http://webdav.example.com/dav', 'davuser', 'davpassword');
$a = webdav_get('/my/nice/object.txt', $res);
webdav_put('/your/nice/thing.txt', $data, $res);
webdav_unlink('/unwanted_resource.txt', $res);
webdav_rename('/dir/old_name', '/dir/new_name', $res);
webdav_copy('/dir/orig_dir', '/dir/new_dir', TRUE, $res);
webdav_close($res);
Product's homepage
What's New in This Release: [ read full changelog ]
· Fixes against segmentation faults on close, that especially happened when PHP was used with the fcgi or fpm SAPI.