Open sproctor opened 10 years ago
If anyone would like to implement the above as a quick fix, here's my modification:
$phpc_root_path = dirname(__FILE__);
$phpc_config_file = "$phpc_root_path/config.php";
require $phpc_config_file;
// constants defined in config
$dbUser = SQL_USER;
$dbPass = SQL_PASSWD;
$dbHost = SQL_HOST;
$dbName = SQL_DATABASE;
(Replacing the existing $dbXXX
variables)
I saved mine as export.php
and added an Apache rewrite rule to allow the vCalendar to be downloaded as if it were a .ics file:
(A simple Alias directive would probably have made more sense, but this was installed in a shared hosting environment.)
.htaccess
RewriteEngine on
RewriteBase /
RewriteRule main.ics /<path to calendar>/export.php [QSA,L]
Works like a charm. I was able to import it to Google Calendar.
Thanks to @sproctor and Christian Toepp!
integrate script from Christian Toepp.