Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1024197
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T11:44:36+00:00 2026-05-16T11:44:36+00:00

Getting super frustrated trying to get this working. Basically this is for a site

  • 0

Getting super frustrated trying to get this working. Basically this is for a site (x10hosting.com) where I can’t include the zend gdata framework, so I’m trying to use the Google Data API with php cURL to access it. The most I’ve been able to do is return a list of the supplied usernames worksheets, using this script:

<?php

// Construct an HTTP POST request
$clientlogin_url = "https://www.google.com/accounts/ClientLogin";
$clientlogin_post = array(
    "accountType" => "HOSTED_OR_GOOGLE",
    "Email" => "", //username
    "Passwd" => '',  //password
    "service" => "writely",
    "source" => "your application name"
);

// Initialize the curl object
$curl = curl_init($clientlogin_url);

// Set some options (some for SHTTP)
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, $clientlogin_post);
curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);

// Execute
$response = curl_exec($curl);

// Get the Auth string and save it
preg_match("/Auth=([a-z0-9_\-]+)/i", $response, $matches);
$auth = $matches[1];

echo "The auth string is: ".$auth;
// Include the Auth string in the headers
// Together with the API version being used
$headers = array(
    "Authorization: GoogleLogin auth=".$auth,
    "GData-Version: 3.0",
);

// Make the request
$key = ;
curl_setopt($curl, CURLOPT_URL, "https://spreadsheets1.google.com/ccc?key=$key");
curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
curl_setopt($curl, CURLOPT_POST, false);

$response = curl_exec($curl);
curl_close($curl);
var_dump($response);
// Parse the response
$response = simplexml_load_string($response);

// Output data
foreach($response->entry as $file)
{
    echo "File: " . $file->title . "<br />";
    echo "Type: " . $file->content["type"] . "<br />";
    echo "Author: " . $file->author->name . "<br /><br />";
}
?>

But I can’t figure out a way to use this to access one specific worksheet. Please help, this is driving me nuts.

EDIT: Following DASPRiD’s advice gives me this error->

Notice:
Zend_Loader::Zend_Loader::registerAutoload is deprecated as of 1.8.0 and will be
removed with 2.0.0; use
Zend_Loader_Autoloader instead in
/home/c3webdev/public_html/library/Zend/Loader.php
on line 266

Warning:
require_once(Zend/Loader/Autoloader.php)
[function.require-once]: failed to
open stream: No such file or directory
in
/home/c3webdev/public_html/library/Zend/Loader.php
on line 267

Fatal error: require_once()
[function.require]: Failed opening
required ‘Zend/Loader/Autoloader.php’
(include_path=’/home/c3webdev/public_html/library:.:/usr/lib/php:/usr/local/lib/php’)
in
/home/c3webdev/public_html/library/Zend/Loader.php
on line 267

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T11:44:37+00:00Added an answer on May 16, 2026 at 11:44 am

    A query to the following URL should list you all worksheets of a specific spreadsheet:

    http://spreadsheets.google.com/feeds/worksheets/**spreadsheetKey**/private/full
    

    To install and use Zend_Gdata, do the following:

    Download the last package (http://framework.zend.com/releases/ZendGdata-1.10.7/ZendGdata-1.10.7.tar.gz) from the Zend Framework website. Now let’s assume the following directors structure:

    • /index.php (your main file)
    • /library/Zend (extract the library/Zend folder in here)

    Now in your index.php, do the following:

    set_include_path(
        dirname(__FILE__) . '/library'
        . PATH_SEPARATOR . get_include_path()
    );
    
    require_once 'Zend/Loader.php';
    
    Zend_Loader::registerAutoload();
    

    Now you can simply follow the manual (http://framework.zend.com/manual/en/zend.gdata.spreadsheets.html). Interesting for you may be the topics “Get a List of Spreadsheets” for creating the service instance and “Get a List of Worksheets” to fetch all worksheets of a specific spreadsheet.

    Update:

    It looks like the Zend_Gdata package is not properly packaged. I will note that to get the package fixed. In the meantime, I suggest you to download the complete Zend Framework package. To use the autoloader in 1.8 correctly, do the following instead:

    require_once 'Zend/Loader/Autoloader.php';
    
    Zend_Loader_Autoloader::getInstance();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.