我有這個代碼正在工作,加載谷歌電子表格並從中加載一些數據。如果有問題的電子表格是公開的,我如何修改代碼以不需要用戶名/密碼?對公共電子表格使用Zend_Gdata_Spreadsheets?
$key="keytothespreadsheet";
$user="[email protected]";
$pass="*****";
$authService = Zend_Gdata_Spreadsheets::AUTH_SERVICE_NAME;
$httpClient = Zend_Gdata_ClientLogin::getHttpClient($user, $pass, $authService);
$gdClient = new Zend_Gdata_Spreadsheets($httpClient);
$query = new Zend_Gdata_Spreadsheets_DocumentQuery();
$query->setSpreadsheetKey($key);
$feed = $gdClient->getWorksheetFeed($query);
print_r($feed);