views:

85

answers:

1

I have read the examples here: http://framework.zend.com/manual/en/zend.gdata.spreadsheets.html

But those examples assume the spreadsheet to be read needs authentication:

$service = Zend_Gdata_Spreadsheets::AUTH_SERVICE_NAME;
$client = Zend_Gdata_ClientLogin::getHttpClient($user, $pass, $service);
$spreadsheetService = new Zend_Gdata_Spreadsheets($client);
$feed = $spreadsheetService->getSpreadsheetFeed();

The spreadsheet I am going to read from is a public one, so I don't really need to provide any authentication right? And what I need to provide is just the url of the spreadsheet.

I tried to read the class description here but still have no idea how it can be done: http://framework.zend.com/apidoc/core/Zend_Gdata/Spreadsheets/Zend_Gdata_Spreadsheets.html

+1  A: 

As far as I'm concerned, access to any Google spreadsheet requires a Google account, even if the document is public (did you try to access it in the browser without being logged in to your Google account?). So yes, you need to provide Zend_Gdata with authentication credentials.

nuqqsa