I was in a meeting a little while back where we had a brief discussion regarding the ability to get data out of Exchange 2007/2010 from a non-Windows OS. The example thrown out was the ability to get an RSS feed from Google Calendar for use elsewhere. I’ve know about Exchange Web Services (EWS) for a while and always wanted to look into using it in a project just to get some familiarity with it. With Exchange 2010 coming out this seemed like a good opportunity to try to see if I could generate an RSS feed from my calendar in a lab environment using a non-.Net language on Linux. I decided to try doing this using PHP, (incorrectly) assuming that there’ be some easily discoverable examples I could download and tweak to do what I wanted.
I did discover some snippets and information that helped point me in the right direction, but no simple complete “here run this” kind of examples. I initially came across an article by Thomas Rabaix on using SOAP PHP and NTLM authentication (http://rabaix.net/en/articles/2008/03/13/using-soap-php-with-ntlm-authentication ). This code used cURL to help handle NTLM authentication to an IIS server. That then led me to an article by Erik Cederstrand http://www.howtoforge.com/talking-soap-with-exchange that built on Thomas’ work. Between them these two extend the PHP SOAPClient and then override some of the methods to use curl to handle the NTLM authentication that EWS uses by default. Using these examples as a starting point and some other bits of info I’ve come across I’ve been able to put together a couple of scripts that will generate an ATOM based feed using a user’s calendar. What I’ve managed to cobble together works but is not something I’d describe as robust. The solution is briefly described below. I’m hoping to follow up with a few other posts that go into a bit more detail about how all the pieces work. [the code is available from here or from Google Code ]
The scripts in action
In my example Exchange environment I’ve created a user called (imaginatively enough) ctronco. Opening up Outlook for the user I can see the following events on this weeks calendar.

Turning now to the Ubuntu box where I’ve installed the PHP scripts. Firing up a browser and pointing it to the correct URL (http://192.168.1.175/ewscalendarfeed/getfeed/ctronco) I get the following results in Firefox, Internet Explorer and Opera (Chrome doesn’t appear to like feeds so I haven’t included it).
| Output in Firefox | Output in Internet Explorer | Output in Opera |
![]() |
![]() |
![]() |
Continue reading Generating an ATOM feed from an Exchange 2007/10 calendar





Recent Comments