PHP Classes

File: post.php

Recommend this page to a friend!
  Classes of Alexander Skakunov   Google Calendar Wrapper   post.php   Download  
File: post.php
Role: Example script
Content type: text/plain
Description: shows how to add an event easily
Class: Google Calendar Wrapper
Register events in Google Calendar
Author: By
Last change:
Date: 17 years ago
Size: 1,528 bytes


Class file image Download
  Class GoogleCalendarWrapper usage example
  Author: Skakunov Alex (
  Date: 26.11.06
  Description: shows how to add a new event in Google Calendar. You must define login and password.
    Class adds events into your main calendar by default.
    If you want to add events in other calendar, write its XML URL into "feed_url" property like this:
      $gc = new GoogleCalendarWrapper("", "password");
      $gc->feed_url =
    You can provide "basic" URL, it will be automatically converted to "full" one (prepare_feed_url() method).
    How to get the XML URL:

include "GoogleCalendarWrapper.php";

$gc = new GoogleCalendarWrapper("", "password");

//$gc->feed_url = "";
//specify this, if you want to work with not-default calendar (check this:

$s = array();
$s["title"] = "kiss my wife";
$s["content"] = "do it slowly";
$s["where"] = "in our bedroom";
$s["startDay"] = date("Y-m-d");
$s["startTime"] = "10:15:00";
$s["endDay"] = date("Y-m-d");
$s["endTime"] = "12:00:00";

"event '".$s["title"]."' has been added!";