This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//Call this with the shown parameters (make sure $time and $end are integers and in Unix timestamp format!) | |
//Get a link that will open a new event in Google Calendar with those details pre-filled | |
function make_google_calendar_link($name, $begin, $end, $location, $details) { | |
$params = array('&dates=', '/', '&details=', '&location=', '&sf=true&output=xml'); | |
$url = 'https://www.google.com/calendar/render?action=TEMPLATE&text='; | |
$arg_list = func_get_args(); | |
for ($i = 0; $i < count($arg_list); $i++) { | |
$current = $arg_list[$i]; |