This is a discussion on PHP Webdav/ Exchange question within the PHP Language forums, part of the PHP Programming Forums category; I have been working on a php application interfacing with exchange, my application works with PROPFIND but when I do ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
I have been working on a php application interfacing with exchange, my
application works with PROPFIND but when I do a search I get an error 400, can anyone point out to me why, I do a METHOD SEARCH, my code is below: My query is well formed and works, so my header request may be incorrect? HTTP_REQUEST_METHOD_SEARCH=SEARCH $req = &new HTTP_Request($url); if (is_string($username)) { $req->setBasicAuth($username, @$password); } if ($method!=HTTP_REQUEST_METHOD_SEARCH) { $req->setMethod($method); $req->addHeader("Depth", "1"); $req->addHeader("Translate", "f"); } else { $req->setMethod($method); // $req->addHeader("Depth", "1"); // $req->addHeader("Translate", "f"); } $req->addHeader("Content-Type", "text/xml"); $req->addRawPostData($query); $req->sendRequest(); if (PEAR::isError($req->sendRequest())) { echo "ERROR:".$req->getMessage(); } $responsecode=$req->getResponseCode(); |