Create MS Outlook Calendar Event

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
sanharsha
Forum Newbie
Posts: 5
Joined: Mon Oct 22, 2007 10:12 pm

Create MS Outlook Calendar Event

Post by sanharsha »

I have developed a php application to schedule meeting. When saving the page I need to create a file and send to all participants a outlook calendar event. Onece the participant opens thins mail it should be saved in his MS Outlook calendar. Can any one help me how to create this file.

Information that should be sent are:

Date
Time
Venue
Reminder time
Meeting Description
Accept / Decline / Tentative (These info should go to the meeting owners email address)

Thanks
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Post by Christopher »

I believe that outlook supports some standard import formats ... search for those.
(#10850)
sanharsha
Forum Newbie
Posts: 5
Joined: Mon Oct 22, 2007 10:12 pm

Post by sanharsha »

patrikG | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]

Code: Select all

<?php
    $Filename = "SSPCAEvent" . $_GET['ID'] . ".vcs"
    header("Content-Type: text/x-vCalendar");
    header("Content-Disposition: inline; filename=$Filename");

    /** Put mysql connection and query statements here **/

$DescDump = str_replace("\r", "=0D=0A=", $row['Detail']);

$vCalStart = date("Ymd\THi00", $row['EventStart']);
$vCalEnd = date("Ymd\THi00", $row['EventEnd']);
?>

BEGIN:VCALENDAR
VERSION:1.0
PRODID:SSPCA Web Calendar
TZ:-07
BEGIN:VEVENT
SUMMARY:<?php echo $row['Summary'] . "\n"; ?>
DESCRIPTION;ENCODING=QUOTED-PRINTABLE: <?php echo $DescDump . "\n"; ?>
DTSTART:<?php echo $vCalStart . "\n"; ?>
DTEND:<?php echo $vCalEnd . "\n"; ?>
END:VEVENT
END:VCALENDAR

one of my friends gave me the above code


patrikG | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
Post Reply