I have a PHP application which connects to Microsoft Exchange server to retrieve ‘Contacts’ via WebDAV.
Is there a WebDAV query I can issue to Microsoft Exchange to get only contacts that have been changed or added within the last X days?
It’d be a bit easier to deal with than querying for all 30 bajillion contacts every time and doing the check/update/insert thing for every record.
You might want to check out the excellent examples at this website. http://www.troywolf.com/articles/php/exchange_webdav_examples.php. They’re great reference on how to access Exchange via WebDAV using PHP. He even has one on searching for contacts, http://www.troywolf.com/articles/php/exchange_webdav_examples.php#search_contacts, but doesn’t mention the exact field that contains the field you’re interested in constraining on, so I’ll help you out.
Searching the Exchange store (http://msdn.microsoft.com/en-us/library/aa123573(EXCHG.65).aspx) is a great starting place. What you’re looking for specifically is Specify a Date range http://msdn.microsoft.com/en-us/library/aa123600(EXCHG.65).aspx which spells out the syntax for using the dav:creationdate field.
There’s more information on the DAV namespace here http://msdn.microsoft.com/en-us/library/aa565717.aspx as well.
Good luck!