I\'d like to write some simple PHP code for a website, to get read-only access to a public Google calendar list of events using Google\'s calendar API V3. I simply need to d
Some tips to do this are embedded in the comments to Charles' answer. Anyway, as of 2014 (with Google Calendar v3 API), this is what I did:
Go here to see how the v3 API works:
https://developers.google.com/google-apps/calendar/v3/reference/events/list#try-it
Fill at least these three fields in the demo web form available on the above link:
calendarId
: the URL-encoded email address of the owner of the calendar.
timeMax
: End Time
timeMin
: Start Time
(Use this Time Format: 2014-05-04T00:00:00-00:00
(Y-m-d T millisecond - offset))
You'll see the following REQUEST being sent out.
GET https://www.googleapis.com/calendar/v3/calendars/{CALENDER_ID}/events?timeMax={start_time}&timeMin={end_time}&key={YOUR_API_KEY}
Now you can customize this request URL for your requirement and send regular GET requests from your code.
P.S -- To get your API Key, follow the procedure here:
https://developers.google.com/google-apps/calendar/auth