View Single Post
  #14 (permalink)  
Old 04-02-2008, 12:02 PM
emanaton emanaton is offline
New Member
 
Posts: 4
Thumbs up

Quote:
Originally Posted by hba View Post
I use this as a quick and crude workaround to use a Zimbra calendar with a self-signed SSL certificate and HTTP authentication in Google Calendar:
Code:
<?php
header('Content-Type: text/calendar; charset=utf-8');
header('Content-Disposition: attachment; filename="calendar.ics"; ');
print file_get_contents("https://myuser:mypass@myserver/zimbra/home/myuser/calendar.ics");
?>

Very nice! Elegant, yet hackish - I love it. For myself, I need to access several different calendars on a server, so added a get variable for the name thusly:

Code:
<?php
header('Content-Type: text/calendar; charset=utf-8');
header('Content-Disposition: attachment; filename="calendar.ics"; ');
print file_get_contents("https://myuser:mypass@myserver/zimbra/home/".$_GET['user']."/calendar.ics");
?>
... and set the calendar URL in google like:

Code:
http://my.private.com/ical.php?user=joeuser


Sean P. O. MacCath-Moran (Welcome | emanaton.com)
Triskele Media (Welcome to Triskele Media Internet Solutions | Triskele Media Internet Solutions)

Last edited by emanaton; 04-02-2008 at 12:04 PM..
Reply With Quote