php - Retrieve list of google calendar - Zend Framework -
php - Retrieve list of google calendar - Zend Framework -
i have started using zend framework create, update, or delete events in google calendar. @ moment have piece of code supposed retrieve list of calendars not working. when run page displays nothing, blank page , not error. tried printing 'echo hello;' , print it, other 'echo hi;' doesn't print anymore, assume code stops working @ line '$calfeed = $service->getcalendarlistfeed();'
can point me in right direct please? thanks
<?php $path = '/home2/bgolaes/public_html/msnh/zendgdata/library'; $oldpath = set_include_path(get_include_path() . path_separator . $path); // load classes require_once 'zend/loader.php'; zend_loader::loadclass('zend_gdata'); zend_loader::loadclass('zend_gdata_clientlogin'); zend_loader::loadclass('zend_gdata_calendar'); zend_loader::loadclass('zend_http_client'); // connect service $user = "xxxxx"; $pass = "xxxxx"; $service = zend_gdata_calendar::auth_service_name; $client = zend_gdata_clientlogin::gethttpclient($user, $pass, $service); seek { $service = new zend_gdata_calendar($client); echo 'hello'; $calfeed = $service->getcalendarlistfeed(); echo 'hi'; echo '<h1>' . $calfeed->title->text . '</h1>'; echo '<ul>'; foreach ($calfeed $calendar) { echo '<li>' . $calendar->title->text . '</li>'; } echo '</ul>'; } grab (zend_gdata_app_exception $e) { } ?>
retrieving calendar list
$service = zend_gdata_calendar::auth_service_name; $client = zend_gdata_clientlogin::gethttpclient($user, $pass, $service); $service = new zend_gdata_calendar($client); seek { $listfeed= $service->getcalendarlistfeed(); } grab (zend_gdata_app_exception $e) { echo "error: " . $e->getmessage(); } echo "calendar list feed"; echo "<ul>"; foreach ($listfeed $calendar) { echo "<li>" . $calendar->title . " (event feed: " . $calendar->id . ")</li>"; } echo "</ul>";
php zend-framework calendar google-calendar zend-gdata
Comments
Post a Comment