<?php
$gcal_path = "https://www.googleapis.com/calendar/v3/calendars/matrixis.co.uk_0bcoibk2a2t8i8637golf855h4@group.calendar.google.com/events?key=AIzaSyBvaIP4JyhADGRhPDccnNsJ0W1wUxc2fAU&maxResults=1&singleEvents=True&orderBy=startTime";
//create cURL connection
$curl_connection = curl_init('https://www.googleapis.com/calendar/v3/calendars/matrixis.co.uk_0bcoibk2a2t8i8637golf855h4@group.calendar.google.com/events?key=AIzaSyBvaIP4JyhADGRhPDccnNsJ0W1wUxc2fAU&maxResults=1&singleEvents=True&orderBy=startTime');
//set options
curl_setopt($curl_connection, CURLOPT_CONNECTTIMEOUT, 30);
curl_setopt($curl_connection, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)");
curl_setopt($curl_connection, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl_connection, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($curl_connection, CURLOPT_FOLLOWLOCATION, 1);
//set data to be posted
curl_setopt($curl_connection, CURLOPT_POSTFIELDS, $post_string);
//perform our request
$result = curl_exec($curl_connection);
//close the connection
curl_close($curl_connection);
// Populate the '$feed' variable with decoded JSON data.
$dataArray = json_decode($result);
$nextStartTime = $dataArray['items']['start']['dateTime'];
$nextEndTime = $dataArray['items']['end']['dateTime'];
$summary = $dataArray['items']['summary'];
echo $dataArray . '<br>';
echo $nextStartTime . '<br>';
echo $nextEndTime . '<br>';
echo $summary . '<br>';
?>
preferences:
46.35 ms | 402 KiB | 5 Q