Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 08-14-2007, 04:45 PM   PM User | #1
keith1995
Regular Coder

 
Join Date: Jul 2004
Posts: 158
Thanks: 4
Thanked 0 Times in 0 Posts
keith1995 is an unknown quantity at this point
Add Event to Outlook

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?
keith1995 is offline   Reply With Quote
Old 08-14-2007, 08:07 PM   PM User | #2
Fumigator
UE Antagonizer


 
Fumigator's Avatar
 
Join Date: Dec 2005
Location: Utah, USA, Northwestern hemisphere, Earth, Solar System, Milky Way Galaxy, Alpha Quadrant
Posts: 7,686
Thanks: 42
Thanked 637 Times in 625 Posts
Fumigator is a glorious beacon of lightFumigator is a glorious beacon of lightFumigator is a glorious beacon of lightFumigator is a glorious beacon of lightFumigator is a glorious beacon of light
After reading your question I too was curious about this process, so I Googled +outlook +import +event and found this:

http://office.microsoft.com/en-us/ou...CL100626971033

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.
__________________
Fumigator is offline   Reply With Quote
Old 08-14-2007, 08:14 PM   PM User | #3
keith1995
Regular Coder

 
Join Date: Jul 2004
Posts: 158
Thanks: 4
Thanked 0 Times in 0 Posts
keith1995 is an unknown quantity at this point
Fumigator,

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:

http://www.wnymusic.com/calendar/?ac...event_id=11672

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:

http://www.caringonline.org/mc/commu...eventId=108516
https://www.ischool.washington.edu/e...dar.aspx?id=80
http://www.networkinphilly.com/

These sites don't use PHP to do the outlook link so I'm not sure how relevent they are.
keith1995 is offline   Reply With Quote
Old 08-14-2007, 09:18 PM   PM User | #4
Fumigator
UE Antagonizer


 
Fumigator's Avatar
 
Join Date: Dec 2005
Location: Utah, USA, Northwestern hemisphere, Earth, Solar System, Milky Way Galaxy, Alpha Quadrant
Posts: 7,686
Thanks: 42
Thanked 637 Times in 625 Posts
Fumigator is a glorious beacon of lightFumigator is a glorious beacon of lightFumigator is a glorious beacon of lightFumigator is a glorious beacon of lightFumigator is a glorious beacon of light
Looks like ics is = to vcs pretty much. Here's the file on the WNYMusic site:
Code:
BEGIN:VCALENDAR
VERSION:1.0
PRODID:Wnymusic.com Web Calendar
TZ:-05
CALSCALE:GREGORIAN
METHOD:PUBLISH
BEGIN:VEVENT
SUMMARY:The Revenue
LOCATION:Club Infinity
URL;VALUE=URI:http://www.wnymusic.com/calendar.php?event_id=11672
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).
DTSTART:20070814T070000
DTEND:20070814T090000
END:VEVENT
END:VCALENDAR
Seems to me you can create a file in this format (fopen, fwrite), stick an ics extension on it, and there you go.
__________________
Fumigator is offline   Reply With Quote
Old 08-15-2007, 12:08 AM   PM User | #5
whizard
Senior Coder

 
whizard's Avatar
 
Join Date: Jan 2005
Location: Philadelphia, PA, USA
Posts: 1,457
Thanks: 10
Thanked 37 Times in 37 Posts
whizard will become famous soon enoughwhizard will become famous soon enough
http://filext.com/file-extension/ICS
http://filext.com/file-extension/vcs

HTH
Dan

(yay 1000th post!!!)
__________________
If you want to use short tags (<? or <?=$var) then make sure short_open_tag is set to "1". It really helps.
Step 1: Learn. Step 2: Search. Step 3: Post here.
whizard is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 04:41 AM.


Advertisement
Log in to turn off these ads.