PHPWEBDAV ================================ PHPWEBDAV makes extensive use of libneon (http://www.webdav.org/neon/). And to get it run without reinventing the wheel i have stolen a lot of code from the cadaver project (http://www.webdav.org/cadaver/). The following DAV methods are currently (as of 0.0.5, 2001-09-18) implemented: MKCOL - make collection RMCOL - remove collection GET - get file PUT - put file COPY - copy file on server MOVE - move file on server DELETE - delete file on server PROPFIND - read *one* property of a file PROPPATCH - read *one* property of a file To initiate a connection you call phpwebdav_connect(). But there is not phpwebdav_disconnect()! Closing a connection and cleanup is currently handled internally on request-termination only and cannot be triggered explicitly. The functions ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ string phpwebdav_error() return the last error message that occurred; "" if none mixed phpwebdav_connect(string hosturi) initiate a connection to the server identified by hosturi. hosturi: either an URL (http://dav.server.tld:port/) or just the hostname (e.g. dav.server.tld) returns false on error; on success the connectionID is returned. the connectionid will be needed for almost any other function call later on. bool phpwebdav_mkcol(mixed connid, string name) create a collection via the connection identified by connid. connid: connectionid name: absolute path to the collection to create returns TRUE on success; FALSE on error. use phpwebdav_error() to get the errormessage bool phpwebdav_rmcol(mixed connid, string name) delete a collection via the connection identified by connid. connid: connectionid name: absolute path to the collection to delete returns TRUE on success; FALSE on error. use phpwebdav_error() to get the errormessage bool phpwebdav_delete(mixed connid, string name) delete a file via the connection identified by connid. connid: connectionid name: absolute path to the file to delete returns TRUE on success; FALSE on error. use phpwebdav_error() to get the errormessage bool phpwebdav_put(mixed connid, string remote, string local) puts a local file on the server via connection connid connid: connectionid remote: absolute pathname to target file on server local: absolute pathname to source file on local system returns TRUE on success; FALSE on error. use phpwebdav_error() to get the errormessage if the remote target file already exists, it will _NOT_ be overwritten. there is currently no way to change this behaviour from php-scripts. bool phpwebdav_copy(mixed connid, string src, string dest) copy a file on the server connid: connectionid src: absolute source path dest: absolyte destination path returns TRUE on success; FALSE on error. use phpwebdav_error() to get the errormessage if the target file already exists, it will _NOT_ be overwritten. there is currently no way to change this behaviour from php-scripts. bool phpwebdav_move(mixed connid, string src, string dest) copy a file on the server connid: connectionid src: absolute source path dest: absolyte destination path returns TRUE on success; FALSE on error. use phpwebdav_error() to get the errormessage if the target file already exists, it will _NOT_ be overwritten. there is currently no way to change this behaviour from php-scripts. bool phpwebdav_get(mixed connid, string remote, string local) downloads a file from the server to a local file via connid connid: connectionid remote: absolute path on server local: absolute path on local (webserver) system returns TRUE on success; FALSE on error. use phpwebdav_error() to get the errormessage if the target file on the local system already exists, it will _NOT_ be overwritten. there is currently no way to change this behaviour from php-scripts. array phpwebdav_list(mixed connid, string name) list all files within a collection connid: connectionid name: absolute path to collection returns the collection contents on success; FALSE on error. use phpwebdav_error() to get the errormessage if an element in the array ends in a slash (/), it is another collection. otherwise it's a file. string phpwebdav_propget(mixed connid, string remote, string name [, string namespace]) get a file's property connid: connectionid remote: absolute path to file name: name of the property namespace: namespace name (refer to your preferred XML manual for details) returns the value on success; FALSE on error. use phpwebdav_error() to get the errormessage bool phpwebdav_propset(mixed connid, string remote, string name, string value [, string namespace]) set a file's property connid: connectionid remote: absolute path to file name: name of the property value: value to set the property to namespace: namespace name (refer to your preferred XML manual for details) returns TRUE on success; FALSE on error. use phpwebdav_error() to get the errormessage