PHP, CURL, WebDAV ve ARAMA yöntemi

0 Cevap php

PHP nasıl aşağıdaki kıvırmak ifadeyi yeniden istiyorsunuz?

curl http://www.example.com/path/to/folder/ -X SEARCH -d @dasl.xml

İşte ben bugüne kadar ne var, ve "dasl.xml" dosyası beni açma budur.

$ch = curl_init("http://www.example.com/path/to/folder/");
$fp = fopen("webdav.xml", "w");
curl_setopt($ch, CURLOPT_FILE, $fp);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "SEARCH");
curl_exec($ch);
curl_close($ch);
fclose($fp);

Dasl.xml dosya WebDAV sorgulamak için XML içerir. Ben de bu dosyayı geçmek için kullanabileceğiniz bir seçenek var mı? Ya da bir dize ya da başka bir şey olarak dosyanın içeriği iletmekten bir yolu var mı?

Şu anda alıyorum hata ifadesi

DaslStatement: 267 - Dosyanın SAX çözümleyici hata sonu.

Yardımlarınız için teşekkürler.

Update:

İşte bir örnek dasl.xml dosyası:

 <d:searchrequest xmlns:d="DAV:">
  <d:basicsearch>
    <d:select>
      <d:prop><d:getcontentlength/></d:prop>
    </d:select>
    <d:from>
      <d:scope>
        <d:href>/container1/</d:href>
        <d:depth>infinity</d:depth>
      </d:scope>
    </d:from>
    <d:where>
      <d:gt> 
        <d:prop><d:getcontentlength/></d:prop>
        <d:literal>10000</d:literal>
      </d:gt>
    </d:where>
    <d:orderby>
      <d:order>
        <d:prop><d:getcontentlength/></d:prop>
        <d:ascending/>
      </d:order>
    </d:orderby>
  </d:basicsearch>
</d:searchrequest>

Burada DASL Daha fazla bilgi: http://greenbytes.de/tech/webdav/rfc5323.html ve [http://www.webdav.org/dasl/] [2]

0 Cevap