Google немного изменил свой календарь API, и теперь мне нужно исправить некоторые странные символы, которые добавляют себя в текст.Я нашел эту ветку, которая точно описывает проблему, с которой я имею дело: http://www.google.com/support/forum/p/Calendar/thread?tid=25ac3d762b235a51&hl=en
Решение состоит в том, чтобы добавить «& hl = en» или «? Hl = en» в конец моего «основного» URLfeed.
Я не уверен, как это сделать, потому что я получаю фид как объект с Zend_Gdata:
<?php
// load library
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');
// create authenticated HTTP client for Calendar service
$gcal = Zend_Gdata_Calendar::AUTH_SERVICE_NAME;
$user = "xxxxx";
$pass = "xxxxx";
$client = Zend_Gdata_ClientLogin::getHttpClient($user, $pass, $gcal);
$gcal = new Zend_Gdata_Calendar($client);
$query = $gcal->newEventQuery();
$query->setUser('xxxxx@group.calendar.google.com');
$secondary=true;
$query->setVisibility('private');
$query->setProjection('basic');
$query->setOrderby('starttime');
$query->setSortOrder('ascending');
//$query->setFutureevents('true');
$startDate=date('Y-m-d h:i:s');
$endDate="2015-12-31";
$query->setStartMin($startDate);
$query->setStartMax($endDate);
$query->setMaxResults(30);
try {
$feed = $gcal->getCalendarEventFeed($query);
} catch (Zend_Gdata_App_Exception $e) {
echo "Error: " . $e->getResponse();
}
?>
Я попытался сделать это без удачи:
$query->setProjection('basic?hl=en');