|
Using PHP to Make Basic vCalendar/iCalendar Events
MIME Type Setups
A standard vCalendar file has an extension of .vcs and MIME type of text/x-vCalendar. If you use iCalendar, the MIME type is "text/Calendar" and the extension is .ics.
You'll need to tell Apache to send the linked-to file to PHP for parsing, and then tell PHP to send it with the vCalendar MIME type. The easiest way to do this is to have a .php file that sends a stream of data as a vCalendar file to the browser. This is accomplished by calling the header function at the very top of your script. For vCalendars:
<?php
header("Content-Type: text/x-vCalendar");
header("Content-Disposition: inline; filename=MyvCalFile.vcs");
?>
An alternative is to have a .vcs or .ics file with PHP code, but you'll need to make the appropriate changes to your server's httpd.conf and mime.types files. Add .vcs (or .ics) to httpd.conf's AddType application/x-httpd-php line and add the appropriate MIME type to your mime.types file.
On the client side, the browser must have the text/x-vCalendar MIME type registered, and, ideally, it should be told to directly open up the vCalendar file with the calendaring application. Most browsers should have this pre-configured. The rest will probably prompt the user for the application to open the file with. You may want to include help text on what this .vcs file does, and, if necessary, how to configure MIME type settings.
Next Page
| Comments: | ||
| iCal and Email (outlook) | Paul McMahon | 11/03/07 06:22 |
| Scheduler/ Calendar | Darlene | 02/13/06 13:57 |
| event icalendar | arbind kumar | 12/09/05 08:44 |
| Multiple Events/Calendar Export? | Judah Anthony | 10/17/05 19:42 |
| subcription and multiple dates? | Jody Whitesides | 08/25/05 16:29 |
| Web Calendar | Harish Balakrishnan | 08/12/05 23:56 |
| article | Piotr Tomaszewski | 12/02/04 16:34 |
| Multiple Events | Steve Godwin | 12/12/03 23:40 |
| RE: TimeZone issue in Outlook 2000 | roger | 11/17/03 16:43 |
| RE: iCal and email | Christian Berg | 05/06/03 11:18 |
| iCalendar extension for PHP | Joakim Recht | 02/18/03 19:46 |
| Hex Value | James Jeffers | 12/10/02 17:26 |
| RE: TimeZone issue in Outlook 2000 | Shu-Wai Chow | 10/26/02 01:55 |
| TimeZone issue in Outlook 2000 | Jeff | 10/23/02 20:59 |
| RE: whats wrong with my output? | Shu-Wai Chow | 10/22/02 10:23 |
| RE: whats wrong with my output? | Flaimo | 10/21/02 20:21 |
| whats wrong with my output? | Flaimo | 10/19/02 16:00 |
| RE: iCal and email | Shu-Wai Chow | 10/18/02 16:41 |
| iCal and email | Grok | 10/12/02 20:03 |
| RE: not ok for Mozilla | Shu-Wai Chow | 10/11/02 16:15 |
| RE: not ok for Mozilla | yves | 10/11/02 15:45 |
| RE: not ok for Mozilla | Shu-Wai Chow | 10/10/02 15:14 |
| not ok for Mozilla | Yves Glodt | 10/09/02 04:37 |
| event calender | subash | 10/08/02 02:48 |
|
If you are looking for help, please post on the appropriate forum here. Your questions will be answered much more quickly. | ||


