php-general Digest 9 Aug 2010 09:32:00 -0000 Issue 6886
Topics (messages 307370 through 307370):
Re: Google spreadsheet curl
307370 by: Ashley Sheridan
Administrivia:
To subscribe to the digest, e-mail:
[email protected]
To unsubscribe from the digest, e-mail:
[email protected]
To post to the list, e-mail:
[email protected]
----------------------------------------------------------------------
--- Begin Message ---
On Sun, 2010-08-08 at 22:57 +0900, [email protected] wrote:
> Using this code I get error message:
> >
> >
> > "The spreadsheet at this URL could not be found. Make sure that you
> > have the right URL and that the owner of the spreadsheet hasn't
> > deleted it."
> >
> > I have set up a test spreadsheet and it exists. Any ideas on why this
> > might be?
> >
> > <?php
> > $key="[key from google spreadsheet URL";
> > $url = "[well known
> > protocol][colon][[forwardslash]forwardslash]spreadsheets.google.com/feeds/cells/$key/1/public/values";
> >
> >
> > $ch = curl_init();
> >
> > // set URL and other appropriate options
> > curl_setopt($ch, CURLOPT_URL, $url);
> > curl_setopt($ch, CURLOPT_HEADER, 0);
> > curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
> >
> > // grab URL and pass it to the browser
> > $google_sheet = curl_exec($ch);
> > print("<br>google_sheet: $url");
> > print($google_sheet);
> >
> >
> > etc
> > ?>
>
Please do not hijack a thread. When posting a question, create a new
email rather than hit reply, otherwise your message gets grouped with
the question you replied to.
Thanks,
Ash
http://www.ashleysheridan.co.uk
--- End Message ---