connect like this:
require_once('Zend/Gdata/Spreadsheets.php'); require_once('Zend/Loader.php'); $loader = new Zend_Loader(); $loader->loadClass('Zend_Gdata'); $loader->loadClass('Zend_Gdata_Query'); $loader->loadClass('Zend_Gdata_AuthSub'); $loader->loadClass('Zend_Gdata_ClientLogin'); $loader->loadClass('Zend_Gdata_Spreadsheets'); $loader->loadClass('Zend_Gdata_Spreadsheets_DocumentQuery'); $loader->loadClass('Zend_Gdata_Spreadsheets_CellQuery'); $g_service = Zend_Gdata_Spreadsheets::AUTH_SERVICE_NAME; $client = Zend_Gdata_ClientLogin::getHttpClient($login, $password, $g_service); The fact is that literally two weeks ago everything worked, and now it gives an error: Undefined offset: 1 in Zend\Gdata\ClientLogin.php(151)
offset 1 is needed in splitting a string by the "=" symbol:
foreach (explode("\n", $response->getBody()) as $l) { $l = chop($l); if ($l) { list($key, $val) = explode('=', $l, 2);// вот здесь $goog_resp[$key] = $val; } } but $response->getBody() returns https://developers.google.com/accounts/docs/AuthForInstalledApps\n , where there is no "="!
PS Google’s account allows connections from any location and from any applications.