I am trying to access a google spreadsheet through php (by adding &output=csv
to the link) It seems like google does not want this any more, is this correct? I tried file_get_contents
(and yes, allow_url_fopen
is turned on,) which results in an error. When using CURL, even when setting a valid user agent (I used Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.13) Gecko/20080311 Firefox/2.0.0.13
) I get a notice that the file has temporarily moved. The link I am using works fine with accessing the spreadsheet from a browser. I tried setting the spreadsheet to public from within google docs, to no avail.
Solutions suggested here, here and here don't seem to work any more. If google does not want me to do this I won't keep trying, but I haven't found anything supporting that. In the comments of some page I read something about gData ZendFramework
, but would like to avoid anything that is not deployed to a standard LAMP server.
PS: I am not trying to abuse google by leeching their bandwidth. I wrote a conversion script for csv files, and in addition to file upload for conversion I was hoping to integrate with google docs links.