From: "ioannes on 8 Aug 2010 09:57 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 > ?>
From: Ashley Sheridan on 9 Aug 2010 05:30 On Sun, 2010-08-08 at 22:57 +0900, ioannes(a)btinternet.com 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
From: "ioannes on 9 Aug 2010 06:28 This is a new message, not an existing thread. I don't know where the Re: got into the subject. Perhaps I sent it to myself first. Anyway, answer may have something to do with getting Zend installed. John
From: "ioannes on 9 Aug 2010 17:24 I have uploaded Zend to my site but the files within the package do not seem to find each other: Warning: include_once(Zend/Gdata.php) [function.include-once]: failed to open stream: No such file or directory in /home/mysite/Zend/library/Zend/Loader.php on line 146 The line 146 is; if ($once) { include_once $filename; The code goes as below and I am wondering what is this trying to say about $filename, it says: * @param string $filename as a comment, and then uses $filename without defining it. Am I supposed to provide this? This seems a lot of effort just to download a google spreadsheet with curl. =========================================================================== /** * Loads a PHP file. This is a wrapper for PHP's include() function. * * $filename must be the complete filename, including any * extension such as ".php". Note that a security check is performed that * does not permit extended characters in the filename. This method is * intended for loading Zend Framework files. * * If $dirs is a string or an array, it will search the directories * in the order supplied, and attempt to load the first matching file. * * If the file was not found in the $dirs, or if no $dirs were specified, * it will attempt to load it from PHP's include_path. * * If $once is TRUE, it will use include_once() instead of include(). * * @param string $filename * @param string|array $dirs - OPTIONAL either a path or array of paths * to search. * @param boolean $once * @return boolean * @throws Zend_Exception */ public static function loadFile(c, $dirs = null, $once = false) { self::_securityCheck($filename); /** * Search in provided directories, as well as include_path */ $incPath = false; if (!empty($dirs) && (is_array($dirs) || is_string($dirs))) { if (is_array($dirs)) { $dirs = implode(PATH_SEPARATOR, $dirs); } $incPath = get_include_path(); set_include_path($dirs . PATH_SEPARATOR . $incPath); } /** * Try finding for the plain filename in the include_path. */ if ($once) { include_once $filename; ===========================================================================
From: "ioannes on 10 Aug 2010 05:17 On 2010/08/10 6:24, ioannes(a)btinternet.com wrote: > I have uploaded Zend to my site but the files within the package do not > seem to find each other: > I solved this by correcting the include path (should be to the library folder (with no trailing slash)). I get as far as a menu offering to list docs, query or upload. However, clicking these options doesn't do anything, but I will take up the issue with a Zend group. Unless anyone here knows an easier way to curl download a google spreadsheet...? John
|
Pages: 1 Prev: question about compiling a portable web server for linux Next: Limit failed logins attempts |