Narendra Dhami

My Site

Integrate your PHP application with Google Calendar

Posted by Narendra Dhami on July 10, 2008

Google Calendar allows Web application developers to access user-generated content and event information through its REST-based Developer API. PHP’s SimpleXML extension and Zend’s GData Library are ideal for processing the XML feeds generated by this API and using them to build customized PHP applications. This article introduces the Google Calendar Data API, demonstrates how you can use it to browse user-generated calendars; add and update calendar events; and perform keyword searches.


For a long time, the only personal scheduling tool I used on a regular basis was the one that shipped with my PalmPilot. Over the last couple of years, though, I’ve gradually shifted my loyalties to Google Calendar: not only is it more Web-aware, but it also makes it easy to share news about events, organize invitations and responses, and handle different types of events.

Frequently used acronyms
* API: Application Programming Interface
* HTTP: Hypertext Transfer Protocol
* PHP: PHP: Hypertext Preprocessor
* REST: Representational state transfer
* RSS: Really Simple Syndication
* URL: Uniform Resource Locator
* XML: Extensible Markup Language

As a developer too, I find Google Calendar makes for interesting water-cooler conversation: With its Data API, developers can easily build new applications around the data stored in public and private user calendars. This API, which follows the REST model, can be accessed through any XML-capable development toolkit, and already has client libraries for many common programming languages…including my favourite, PHP.

This article will introduce you to the Google Calendar Data API, showing you how to integrate and use calendar data with a custom PHP application. It includes examples of how to:

* Retrieve events from a user’s public notebooks.
* Add new events
* Modify and delete events
* Search for events by keyword or date range

So come on in, and get started! more …


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: