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 6341855
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T20:07:27+00:00 2026-05-24T20:07:27+00:00

I am trying to fetch the data from a google docs spreadsheet and I

  • 0

I am trying to fetch the data from a google docs spreadsheet and I think this should work (also seen similar code in another similar question on here) but the response I get is:

Moved Temporarily
The document has moved here.
with the link to here being:

https://www.google.com/a/4playtheband.co.uk/ServiceLogin?service=wise&continue=https://docs.google.com/a/4playtheband.co.uk/spreadsheet/pub?hl%3Den_US%26hl%3Den_US%26key%3D0AuJb1YSvmVn5dGdvUzU2QUJHUGdaTEZNbVI4dVJ6eHc%26single%3Dtrue%26gid%3D0%26output%3Dcsv%26ndplr%3D1&followup=https://docs.google.com/a/4playtheband.co.uk/spreadsheet/pub?hl%3Den_US%26hl%3Den_US%26key%3D0AuJb1YSvmVn5dGdvUzU2QUJHUGdaTEZNbVI4dVJ6eHc%26single%3Dtrue%26gid%3D0%26output%3Dcsv%26ndplr%3D1&hl=en_US&passive=true&go=true

I don’t know if the problem is to do with the docs in question being used inside Google Apps but I have set the spreadsheet to be public and I copied the link it provided when I went to Share and exported it as a csv.

Here is the code:

<?php

$url='https://docs.google.com/a/4playtheband.co.uk/spreadsheet/pub?hl=en_US&hl=en_US&key=0AuJb1YSvmVn5dGdvUzU2QUJHUGdaTEZNbVI4dVJ6eHc&single=true&gid=0&output=csv';

if (($handle = fopen($url, "r")) !== FALSE)
{
    while (($data = fgetcsv($handle, 1000, ",")) !== FALSE)
    {
        $totalrows = count($data);
        for ($row=0; $row<=$totalrows; $row++)
        {
            echo $data[$row];
        }
    }
    fclose($handle);
}
?>

If it might be an issue I am actually trying to place the fetched data inside a facebox and it seems to be working except for the actual spreadsheet data not appearing since the error message I mentioned earlier actually appears inside the facebox.

Thanks.

UPDATE
The code seems to work perfectly fine when the spreadsheet is created within my personal google account and not the account that I use for Google Apps.

  • 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-24T20:07:30+00:00Added an answer on May 24, 2026 at 8:07 pm

    I managed to fix this by firstly using a spreadsheet inside my own google account and not google apps and by then using the following code:

    <div id="faqSection">
    <!-- The FAQs are inserted here -->
    <p>
    
    <?php
    // link to Google Docs spreadsheet
    $url='google docs spreadsheet url';
    
    // open file for reading
    if (($handle = fopen($url, "r")) !== FALSE)
    {
        while (($data = fgetcsv($handle, 1000, ",")) !== FALSE)
        {
            $totalrows = count($data);
            for ($row=0; $row<=$totalrows; $row++)
            {
                // only print out even rows, i.e. the questions
                // the second if is to avoid blank divs from being printed out
                // which was a bug I was experiencing
                if (($row % 2 == 0) && (strlen($data[$row])>0))
                {
                    $answer = $row + 1;
                    echo '<dt><span class="icon"></span>'.$data[$row].'</dt><dd>'.$data[$answer].'</dd>';
                }
            }
        }
        fclose($handle);
    }
    ?>
    </p>
    </div>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to fetch data of some https website from google appengine (java). There
I'm trying to fetch some data from a column whose DATA_TYPE=NUMBER(1,0) with this piece
I'm trying to fetch data from a div (based on his id), using PHP's
I am trying to fetch data from DB and loading the DB with the
I'm using an Oracle DB and I'm trying to fetch data from its tables
I am trying to fetch data from my database and when I display it
So I'm trying to fetch objects from core data. I have list of say
I am trying to fetch data from the following database data: And display the
hi I am trying to fetch data from link as given below http://abovestress.com/app_stress/fetch_all_detail.php?task=fetchtimefromdateanduserid&track_date=2011-08-09&tracker_user_id=374 but
I'm trying to have Django (on top of GAE) fetch data from another web

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.