Ics File Creation

I am trying to create a .ics file using php and mysql but am lost. I have my database created and can pull everything into the php page but I’m lost on how to convert that to an .ics file. Can someone please explain how to do this?

Thanks
Dave

Do you know the isc file format I mean how does this store the text in it? I am not well known about the .ics extension files except calendar file :


Calendar used by Mozilla Calendar and Apple iCal; calendar data can be published to the Web and subscribed to by other users, which imports events to their calendars

mentioned in http://www.fileinfo.net/extension/ics

If you can say the text format, then it would be easier to tell for me… Lol!

I came across ics files a few weeks ago, its well cool. I havent tried it yet because the diary app I was working on got called off.

But this is how I imagined going about it:

Goog for “php to ics” and there are some results.

this page explains the mime type you need to set.

Basically you need to mess around and get the ics output exactly as it should be, throw it onto a webpage for starters, then when you are sure its correct write the output to a file instead, preceding that with the headers mentioned in the above link.

I think thats how to do it, but there are more links on that goog search.

Let us know how it goes.

How would you do it if it were a txt format? I would think this could be done the same way just a different extention.

When I open an ics file it is basically a text file with an ics extension

Here is a sample of an ics file:


BEGIN:VCALENDAR
PRODID:-//Google Inc//Google Calendar 70.9054//EN
VERSION:2.0
CALSCALE:GREGORIAN
METHOD:PUBLISH
X-WR-CALNAME:David
X-WR-TIMEZONE:America/New_York
BEGIN:VTIMEZONE
TZID:America/New_York
X-LIC-LOCATION:America/New_York
BEGIN:DAYLIGHT
TZOFFSETFROM:-0500
TZOFFSETTO:-0400
TZNAME:EDT
DTSTART:19700308T020000
RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=2SU
END:DAYLIGHT
BEGIN:STANDARD
TZOFFSETFROM:-0400
TZOFFSETTO:-0500
TZNAME:EST
DTSTART:19701101T020000
RRULE:FREQ=YEARLY;BYMONTH=11;BYDAY=1SU
END:STANDARD
END:VTIMEZONE

BEGIN:VEVENT
DTSTART;VALUE=DATE:20070417
DTEND;VALUE=DATE:20070418
DTSTAMP:20071003T171517Z
ORGANIZER;CN=David:MAILTO:me@home.com
UID:41r8cefge2pi3tmt7tt766baf4@google.com
COMMENT;X-COMMENTER=MAILTO:me@home.com:<p>Hey Everyone: I think I have talked to everyone about setting up a brainstorm/initial planning meeting for a complete overhaul of the current FCAG site. I have penciled in a meeting for Tuesday April 10  @ 7:00 PM 8:30 PM.  Would you be able to attend?
CLASS:PUBLIC
CREATED:20070402T234821Z
DESCRIPTION:Website Brainstorm Session
LAST-MODIFIED:20070411T115625Z
LOCATION:FCAG
SEQUENCE:2
STATUS:CONFIRMED
SUMMARY:FCAG Website Meeting
TRANSP:TRANSPARENT
END:VEVENT

BEGIN:VEVENT
DTSTART;VALUE=DATE:20071225
DTEND;VALUE=DATE:20071225
DTSTAMP:20071003T171517Z
ORGANIZER;CN=David:MAILTO:me@home.com
UID:kaii6it1gmbpncmkavjkpkq1tk@google.com
CLASS:PUBLIC
CREATED:20070209T113646Z
LAST-MODIFIED:20070209T113646Z
SEQUENCE:0
STATUS:CONFIRMED
SUMMARY:Christmas
TRANSP:OPAQUE
END:VEVENT
END:VCALENDAR

Thanks
Dave

Hi, Some information on iCal

The specification
http://www.ietf.org/rfc/rfc2445.txt

An article on how to do it (partially)

http://www.phpbuilder.com/columns/chow20021007.php3

I’m trying to write it but a bit ham-strung because I don’t have a Mac or Outlook, so I have to rely on the kindness of friends to test my script.

My test bed is http://businesscalendar.org/testlink.htm let me know if you are interested in more info.

Alex

The file Imports into Google agenda OK.

I know there is some way of getting Gmail to make the meeting pop up on screen because I saw it happen from a site I visited. If I could figure that, it would be neato.

If it’s a text file with a different extension, then write out a text file and use a different extension!

@Alex
Your link: “Just fooling around with this one”.

Yeah, that works for me in Google.
“Lots of thalking and speaches and some lunch”

Goes straight into my google calendar OK.