Je cherche à récupérer l'évènement du jour de mon agenda Google :
Code : Tout sélectionner
<?php
require_once 'GoogleAgenda.php';
require_once 'GoogleAgendaEvent.php';
require_once 'GoogleAgendaException.php';
try {
$oAgendaConges = new GoogleAgenda("https://calendar.google.com/calendar/ical/xxxxx%40gmail.com/private-xxxxxxx/basic.ics", false);
$aAujourdhui = $oAgendaConges->getEvents(array(
'startmin' => date('Y-m-d'),
'startmax' => date('Y-m-d',strtotime("+24 hours")),
'sortorder' => 'ascending',
'orderby' => 'starttime',
'maxresults' => '1',
'startindex' => '1',
'search' => '',
'singleevents' => 'true',
'futureevents' => 'false',
'timezone' => 'Europe/Paris',
'showdeleted' => 'false'
));
echo $aAujourdhui ;
PS : les fichiers GoogleAgenda.php / GoogleAgendaEvent.php / GoogleAgendaException.php http://www.domo-blog.fr/?wpdmdl=2394 sont issus du blog http://www.domo-blog.fr/gestion-ordures-domotique/