PHP to ICS (iCalendar) file conatining multiple Events/Tasks For MS Outlook and iCal

Posted on 2009-12-18
Medium Priority
Last Modified: 2012-05-08

I am using the iCalcreator class (php) found here (http://www.kigkonsult.se/iCalcreator/index.php) to create an ics file.

There are multiple events/tasks that i need the file to contain.

It works fine for iCal (on my mac) ....


For MS Outlook it will only allow me to save/store the first event/task.

Does MS Outlook allow for multiple events to be added at once from an ics file?

If so can you see where I am going wrong?

Mucho gracias,


$v = new vcalendar();// initiate new CALENDAR
$v->setConfig( 'unique_id', "$domainname" );
$v->setProperty( 'method', 'PUBLISH' );
$v->setProperty( "x-wr-calname", "Calendar Sample" );
// required of some calendar software
$v->setProperty( "X-WR-CALDESC", "Calendar Description" );
// required of some calendar software
$v->setProperty( "X-WR-TIMEZONE", "Europe/London" );
//$v->setProperty( 'method', "REQUEST" );
/* start parse of remote file */
$v->setConfig( 'url', "$domainname/reedscalendar-$currenttime.ics" );
// iCalcreator also support remote files

//mysql - get the events


$e = new vevent(); // initiate a new EVENT
$e->setProperty( 'uid', $eventID );
$e->setProperty( "dstamp" , $year, $month, $day, $hour, $minute, 00 ); 
$e->setProperty( 'dtstart',  $year, $month, $day, $hour, $minute, 00 );  // 24 dec 2006 19.30
$e->setProperty( 'summary' , "$summary" );
$e->setProperty( 'description', "$event_description" );    // describe the event
$v->addComponent( $e );


$v->returnCalendar();                       // generate and redirect output to user browser

Open in new window

Question by:bigMlittleC
LVL 11

Accepted Solution

asafadis earned 2000 total points
ID: 26079246
Yes... and no.

That I know of, Outlook can import multiple event if, and only if, you manually go to: File > Import and Export... > Import VCARD file (.VCF)

I assume you want your users to click on a link and voilà!  This "method" will only allow you to do one event.

Author Closing Comment

ID: 31667697
Thanks, adding via the import/export tool allows for all events to be added!

Its no surprise that MS struggles to provide a simple way to handle this.

Merry xmas!

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
3 proven steps to speed up Magento powered sites. The article focus is on optimizing time to first byte (TTFB), full page caching and configuring server for optimal performance.
Users will learn how resize a batch of photos from a single command in Photoshop via Photoshop's Image Processor. Open up an Image you'd like to resize in Adobe Photoshop: Adjust the image size according to your preferences. Image > Adjustments > …
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Suggested Courses
Course of the Month15 days, 4 hours left to enroll

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question