NOTES: This requires: * PHP XSLT libraries installed * PHP Tidy libraries installed --------------------------------------------- */ $dev = substr($_SERVER['HTTP_HOST'], 0, 4) == 'dev.'; $public_beta = true; // turn on for dev builds that the public is testing // if not on a development/staging deployment... if (!$dev || $public_beta) { error_reporting(0); // turn off error reporting } include '../common.php'; $uri = geturiparam('/vcf/', true); /* if (!$dev && contains($uri,"f1calendar.com")) { header("Status: 200"); // avoid default 404 from .htaccess ErrorDocument print 'f1calendar.com conversions are currently causing problems and are not supported for now. (2010-011)'; exit(); } */ header("Status: 200"); // avoid default 404 from .htaccess ErrorDocument if (substr($uri, 0, 7) == "http://" || substr($uri, 0, 8) == "https://") { if ($dev) { set_time_limit(90); } // explode on the '#' to separate the anchor link from the page $temp = explode("#", $uri);
$dev = substr($_SERVER['HTTP_HOST'], 0, 4) == 'dev.'; $public_beta = true; // turn on for dev builds that the public is testing // if not on a development/staging deployment... if (!$dev || $public_beta) { error_reporting(0); // turn off error reporting } include '../common.php'; if (substr(@$_SERVER['REQUEST_URI'], 0, 9) == '/ics/sub/') { $subscribe = true; $uri = geturiparam('/ics/sub/', false); // get a subscription redirect URI } else { $subscribe = isset($_REQUEST['subscribe']); $uri = geturiparam('/ics/', true); if ($uri == 'http://sub/') { // someone just went to http://h2vx.com/ics/sub/ header("Location:http://h2vx.com/ics/"); // send them back to the UI exit; } } // Check for subscription if ($subscribe) { header("Location:webcal://h2vx.com/ics/{$uri}"); exit; } /* if (!$dev && contains($uri,"f1calendar.com")) { header("Status: 503"); // avoid default 404 from .htaccess ErrorDocument