Jump to content

iCal / Outlook


karldesign

Recommended Posts

Trying to find an answer for this, so hope you can all help...

 

I have an events calendar on a website that I would like users to be able to download an iCal/Outlook calendar reminder. I have created the file by using php:

 

$fileid 	= $_GET['id'];
$filename 	= $fileid.".ics";
$fileopen = fopen($filename, 'w') or die("can't open file");
$filecontent = "BEGIN:VCALENDAR
VERSION:2.0
METHOD:PUBLISH
BEGIN:VEVENT
ORGANIZER:
DTSTART;VALUE=DATE:$starts
DTEND;VALUE=DATE:$ends
LOCATION:location
URL:url
TRANSP:TRANSPARENT
SEQUENCE:0
UID:111
DTSTAMP:20080117T102312Z
DESCRIPTION:test
SUMMARY:test
PRIORITY:5
X-MICROSOFT-CDO-IMPORTANCE:1
CLASS:PUBLIC
END:VEVENT
END:VCALENDAR";
fwrite($fileopen, $filecontent);
fclose($fileopen);

 

The problem is, when a user downloads this file, it only shows in the browser (text) and does not attempt to download the .ics file...

 

Any help would be great!

Link to comment
https://forums.phpfreaks.com/topic/95837-ical-outlook/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.