Accessing Exchange Server using PHP -
i trying access windows exchange server using php. found class online connection exchange server http://www.troywolf.com/articles/php/exchange_webdav_examples.php
the problem when try code syntax error , sure how solve it.
if @ first example
$h->xmlrequest = '<?xml version="1.0"?>'; $h->xmlrequest .= <<<end <a:searchrequest xmlns:a="dav:" xmlns:s="http://schemas.microsoft.com/exchange/security/"> <a:sql> select "dav:displayname" scope('hierarchical traversal of "$exchange_server/exchange/twolf/inbox"') </a:sql> </a:searchrequest> end;
in second line syntax error , not sure how solve it.
parse error: syntax error, unexpected t_sl
also $exchange_server value put web mail address? ex. https://exch2.mydomain.com/owa/
thanks
the code must looking this:
$exchange_server = 'localhost'; $h->xmlrequest = '<?xml version="1.0"?>'; $h->xmlrequest .= <<<end <a:searchrequest xmlns:a="dav:" xmlns:s="http://schemas.microsoft.com/exchange/security/"> <a:sql> select "dav:displayname" scope('hierarchical traversal of "$exchange_server/exchange/twolf/inbox"') </a:sql> </a:searchrequest> end; # !!! no more content after ; (spaces included, had one) !!! echo $h->xmlrequest;
Comments
Post a Comment