Hello, I'm trying to generate the datasource for a graph using PHP. I'm in the early stages of the project. When I send the request to the URL Google Docs gave me it works just fine. But when I copy the output of that url and make my php script "echo" it, it doesn't work. The page loads without the graph, and several seconds later the alert "Error in query: Request timed out" shows up.
For what it's worth, I did notice that the output of the spreadsheet URLl is smaller text and all on one line, whereas the output from my php file is larger and wraps within the browser window. Is there something I'm missing? I'm not an expert in this stuff, so any help you guys could give would be greatly appreciated. Google Docs datasource URL: http://spreadsheets.google.com/tq?range=A1:C6&headers=-1&key=rjn64HkyaSuZ9tzu-Xiig6w&gid=0 Output: google.visualization.Query.setResponse ({version:'0.6',status:'ok',sig:'2095564886',table:{cols: [{id:'A',label:'Time',type:'date',pattern:'M/d/yyyy'}, {id:'B',label:'Target',type:'number',pattern:'#0.###############'}, {id:'C',label:'Current',type:'number',pattern:'#0.###############'}],rows: [{c:[,{v:100.0,f:'100'},{v:98.0,f:'98'}]},{c:[{v:new Date (2009,0,2),f:'1/2/2009'},{v:150.0,f:'150'},{v:120.0,f:'120'}]},{c: [{v:new Date(2009,0,3),f:'1/3/2009'},{v:250.0,f:'250'},{v: 210.0,f:'210'}]},{c:[{v:new Date(2009,0,4),f:'1/4/2009'},{v: 400.0,f:'400'},{v:350.0,f:'350'}]},{c:[{v:new Date (2009,0,5),f:'1/5/2009'},{v:600.0,f:'600'},{v:500.0,f:'500'}]}]}}); PHP script URL: drinkcoffea[dot]com/get_data[dot]php Output: google.visualization.Query.setResponse ({version:'0.6',status:'ok',sig:'2095564886',table:{cols: [{id:'A',label:'Time',type:'date',pattern:'M/d/yyyy'}, {id:'B',label:'Target',type:'number',pattern:'#0.###############'}, {id:'C',label:'Current',type:'number',pattern:'#0.###############'}],rows: [{c:[,{v:100.0,f:'100'},{v:98.0,f:'98'}]},{c:[{v:new Date (2009,0,2),f:'1/2/2009'},{v:150.0,f:'150'},{v:120.0,f:'120'}]},{c: [{v:new Date(2009,0,3),f:'1/3/2009'},{v:250.0,f:'250'},{v: 210.0,f:'210'}]},{c:[{v:new Date(2009,0,4),f:'1/4/2009'},{v: 400.0,f:'400'},{v:350.0,f:'350'}]},{c:[{v:new Date (2009,0,5),f:'1/5/2009'},{v:600.0,f:'600'},{v:500.0,f:'500'}]}]}}); --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Visualization API" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/google-visualization-api?hl=en -~----------~----~----~----~------~----~------~--~---
