Getting Google Calendar events in PHP Getting Google Calendar events in PHP xml xml

Getting Google Calendar events in PHP


Another option is to use the Zend Google Calendar library, it is a separate part of the zend framework so you don't need the whole zend framework

http://framework.zend.com/manual/en/zend.gdata.calendar.html

it is not that hard once you have a look at the examples.


In case it helps anyone else, I figured out how to get calendars other than the default. If you go into your google calendar and look up calendar settings, at the bottom there is a calendar ID that is formatted like a really long email address.(example: adg5jcq8gk7lsp6rrbmrm8c@group.calendar.google.com) Use that with $query->setUser() to use that specific calendar.


As a heads up to anyone using the code, echo $event; didn't display anything for me, so I thought the query was failing.

Here is a snippet that should print something:

foreach ($eventFeed as $event) {  echo $event->title->text . '<br />';}