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

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

I am using the iCalcreator class (php) found here ( 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

    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

    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!

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    What Is Threat Intelligence?

    Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

    Are you looking to clear some space on your phone for the latest iOS 8 update? Did you switch to Spotify so you no longer need to keep music native on your phone? Run out of space for taking photos while in the middle of vacation? Sometimes the quic…
    These days socially coordinated efforts have turned into a critical requirement for enterprises.
    Users will learn how to set proper sequence settings, scale images, paste attributes, add transitions, fades, and music. Open up Final Cut Pro 7 and Create a new Project: Set the Sequence Settings. a) Click File > Easy Setup > Format > Apple ProRe…
    The viewer will learn how to count occurrences of each item in an array.

    737 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

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now