PHP Classes

ics for google calendar

Recommend this page to a friend!

      iCalCreator  >  All threads  >  ics for google calendar  >  (Un) Subscribe thread alerts  
Subject:ics for google calendar
Summary:How to create ics for google calendar import?
Messages:2
Author:kauzers
Date:2010-05-31 07:40:14
Update:2010-06-22 08:42:30
 

  1. ics for google calendar   Reply   Report abuse  
Picture of kauzers kauzers - 2010-05-31 07:40:14
ics made by default stuff cant import in to google calendar. Maybe somebody know beter php class for isc preparation?


<?php
$v = new vcalendar(); // create a new calendar instance
$v->setConfig( 'unique_id', 'icaldomain.com' ); // set Your unique id
$v->setProperty( 'method', 'PUBLISH' ); // required of some calendar software
$vevent = new vevent(); // create an event calendar component
$vevent->setProperty( 'dtstart', array( 'year'=>2007, 'month'=>4, 'day'=>1, 'hour'=>19, 'min'=>0, 'sec'=>0 ));
$vevent->setProperty( 'dtend', array( 'year'=>2007, 'month'=>4, 'day'=>1, 'hour'=>22, 'min'=>30, 'sec'=>0 ));
$vevent->setProperty( 'LOCATION', 'Central Placa' ); // property name - case independent
$vevent->setProperty( 'summary', 'PHP summit' );
$vevent->setProperty( 'description', 'This is a description' );
$vevent->setProperty( 'comment', 'This is a comment' );
$vevent->setProperty( 'attendee', 'attendee1@icaldomain.net' );
$v->setComponent ( $vevent ); // add event to calendar
$vevent = new vevent();
$vevent->setProperty( 'dtstart', '20070401', array('VALUE' => 'DATE'));// alt. date format, now for an all-day event
$vevent->setProperty( "organizer" , 'boss@icaldomain.com');
$vevent->setProperty( 'summary', 'ALL-DAY event' );
$vevent->setProperty( 'description', 'This is a description for an all-day event' );
$vevent->setProperty( 'resources', 'COMPUTER PROJECTOR' );
$vevent->setProperty( 'rrule', array( 'FREQ' => 'WEEKLY', 'count' => 4));// occurs also four next weeks
$vevent->parse( 'LOCATION:1CP Conference Room 4350' );// supporting parse of strict rfc2445 formatted text
$v->setComponent ( $vevent ); // add event to calendar

// all calendar components are described in rfc2445
// a complete iCalcreator function list (ex. setProperty) in iCalcreator manual

$v->returnCalendar(); // redirect calendar file to browser

?>

  2. Re: ics for google calendar   Reply   Report abuse  
Picture of Jeni Jeni - 2010-06-22 08:42:30 - In reply to message 1 from kauzers
require_once( 'iCalcreator.class.php' );

u should downnload this class(iCalcreator.class.php), add this to ur php program