I would like to create a PHP script that fetches a few rows from a Google Spreadsheets and display it in html.
$authService = Zend_Gdata_Spreadsheets::AUTH_SERVICE_NAME;
$httpClient = Zend_Gdata_ClientLogin::getHttpClient($user, $pass, $authService);
$gdClient = new Zend_Gdata_Spreadsheets($httpClient);
$feed = $gdClient->getSpreadsheetFeed('https://spreadsheets.google.com/ccc?key=MY_DOC_KEY');
$currKey = explode('/', $feed->entries[0]->id->text);
$query = new Zend_Gdata_Spreadsheets_CellQuery();
$query->setSpreadsheetKey($this->currKey);
$query->setWorksheetId($this->currWkshtId);
$query->setMinCol(1);
$query->setMaxCol(7);
$query->setMinRow(2);
$feed = $gdClient->getCellFeed($query);
However that throws a really ugly error message. What am i doing wrong?
Fatal error: Uncaught exception 'Zend_Gdata_App_Exception' with message 'DOMDocument cannot parse XML: DOMDocument::loadXML() Extra content at the end of the document in Entity, line: 23'