WordPress.org

Ready to get started?Download WordPress

Forums

how to create iCalendar (ics) files (1 post)

  1. rafael1119
    Member
    Posted 6 years ago #

    All,

    This is the code I have but I am getting an error message when I try to open this ical (ics) file with Outlook.

    Any one has a sample of how to properly format/create ics/iCalendar files in PHP?

    BEGIN:VCALENDAR
    PRODID:-//Microsoft Corporation//Outlook 11.0 MIMEDIR//EN
    VERSION:2.0
    METHOD:PUBLISH
    BEGIN:VEVENT
    ORGANIZER:MAILTO:myemail@domain.com
    DTSTART:<?=ec3_to_utc($entry->dt_start)?>
    DTEND:<?=ec3_to_utc($entry->dt_end)?>
    LOCATION:<?=$summary?>
    TRANSP:OPAQUE
    SEQUENCE:0
    UID:<?="{$entry->sched_id}-{$permalink}"?>
    DTSTAMP:20080212T005022Z
    SUMMARY:My Subject
    PRIORITY:5
    X-MICROSOFT-CDO-IMPORTANCE:1
    CLASS:PUBLIC
    BEGIN:VALARM
    TRIGGER:-PT15M
    ACTION:DISPLAY
    DESCRIPTION:Reminder
    END:VALARM
    END:VEVENT
    END:VCALENDAR

    Thanks,

    Rafael

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags