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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.