A WebDAV GET request can be handled similar to a normal HTTP GET request. Just make sure that you always set appropriate Content-Length: and Last-Modified: headers before returning the actual content.

The path of the requested resource is passed to GET() in the parameter element 'path':

<?php
  
function GET(&$param) {
    
$fspath $this->base $param["path"];

    if (
file_exists($fspath)) {       
      
header("Content-Type: "  mime_content_type($fspath); 
      
header("Last-Modified: " date("D, j M Y H:m:s "file_mtime($fspath)) . "GMT");
      
header("Content-Length: "filesize($fspath));

      
readfile($fspath);
      return 
true;
    } else {
      return 
false;
    }       
  }
?>