View Full Version : Add Event to Outlook
08-14-2007, 04:45 PM
We have a calendar created via PHP and MySQL. Upon clicking on an event and viewing the full details of the event, we'd like to add a link that would download that event to Microsoft Outlook. The data for the download would come from the database which we'd Query via the unique ID for the event.
Any ideas what format or how we'd go about creating the necessary PHP code to call the database, gather the event details, put them into the necessary format to work with Outlook and export the data to a file format that Outlook would automatically open?
08-14-2007, 08:07 PM
After reading your question I too was curious about this process, so I Googled +outlook +import +event and found this:
Which describes the format of a vCalendar-type file (extension .vcs). However I was not able to find a way to automatically import a vcs file into Outlook-- it seems the only way to do it is open Outlook and use the "import" utility inside the application. Perhaps there is a way to automate it, but I was not able to find it.
08-14-2007, 08:14 PM
Thanks for the response. I don't know much about the VCS format. I have seen the export to outlook calendar on a few different sites and they use the ICS format each time.
For example, look at:
They have an icon of a calendar next to the title of the event which is a link to a file called event_ics.php that generates the ICS file. I've contacted this website to see if they'd be willing to share their code but if anyone else has any ideas of how to do this, I'd be greatful.
A few other examples are:
These sites don't use PHP to do the outlook link so I'm not sure how relevent they are.
08-14-2007, 09:18 PM
Looks like ics is = to vcs pretty much. Here's the file on the WNYMusic site:
PRODID:Wnymusic.com Web Calendar
DESCRIPTION;ENCODING=QUOTED-PRINTABLE: Tickets available at Club Infinity Box Office (716)565-0110, Tickets.com, Tops Supermarkets. Free Parking. All shows are 18 and up (if under 18, must be accompanied by someone over 21).
Seems to me you can create a file in this format (fopen, fwrite), stick an ics extension on it, and there you go.
08-15-2007, 12:08 AM
(yay 1000th post!!!)
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.