I am trying to use the Google Docs API to get spreadsheet data as XML, and eventually JSON data. I have put the URL (http://spreadsheets.google.com/feeds/list/0Aizy-VIdLC0QdDNNRkpfVncxQzZRNG9fMVhueXVMenc/1/private/values) in my browser, and I get the data, even when not logged in to Google.
When I try with jQuery Ajax, I get the "page not found" error.
$.get('http://spreadsheets.google.com/feeds/list/0Aizy-VIdLC0QdDNNRkpfVncxQzZRNG9fMVhueXVMenc/1/private/values', function(data) {
console.log(data)
});
I am guessing that same origin policy might be the cause of the Ajax error, so I tried with PHP, but I get the error.
echo file_get_contents("http://spreadsheets.google.com/feeds/list/0Aizy-VIdLC0QdDNNRkpfVncxQzZRNG9fMVhueXVMenc/1/private/values");
I am aiming to get the Google Docs spreadsheet data into a JSON object for use on a webpage.
How can I fix this error?