Page 1 of 1

Converting google spreadsheet for use in xcelsius dashboard

Posted: Mon Nov 15, 2010 4:24 pm
by tjjansma
Hi,
I've been pulling my hair out trying to make this happen and I was hoping someone can help me out. I want to make a google spreadsheet accessible through a swf created in xcelsius and I'm running into Flash security issues. So I thought I would write a php script that would open the spreadsheet and save it as an html document, which would be read by the xcelsius swf. I'm probably missing something here, but here's the code I came up with.

<?php
$src = fopen('http://spreadsheets.google.com/pub?key= ... FYyRTVyT2c', 'r');
$dest1 = fopen('goals.html', 'w');
stream_copy_to_stream($src, $dest1);
?>

Here's the error I get:
Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/focusdco/public_html/TwoRiversPCS/goals3.php on line 10

Re: Converting google spreadsheet for use in xcelsius dashbo

Posted: Mon Nov 15, 2010 6:01 pm
by s992
I'm not sure the problem is in the code you posted. I copy pasted and ran it exactly as presented with no problems.

Re: Converting google spreadsheet for use in xcelsius dashbo

Posted: Tue Nov 16, 2010 2:10 pm
by tjjansma
Thanks for the response.
I'll look into what's happening when I run it.

Re: Converting google spreadsheet for use in xcelsius dashbo

Posted: Tue Nov 16, 2010 2:48 pm
by s992
Can you post line 10 and some of the surrounding lines?

Re: Converting google spreadsheet for use in xcelsius dashbo

Posted: Tue Nov 16, 2010 3:21 pm
by tjjansma
9 <?php
10 $src = fopen('http://spreadsheets.google.com/pub?key= ... FYyRTVyT2c', 'r');
11 $dest1 = fopen('/home/focusdco/public_html/TwoRiversPCS/goals.html', 'w');

Could this be a shared hosting permissions issue?

Re: Converting google spreadsheet for use in xcelsius dashbo

Posted: Tue Nov 16, 2010 3:51 pm
by s992
I'm really not sure, T_CONSTANT_ENCAPSED_STRING references double and single quotes(http://us2.php.net/tokens). Maybe try replacing the single quotes with double quotes? I'm just taking a shot in the dark here..someone with a better idea, please feel free to step in!

Re: Converting google spreadsheet for use in xcelsius dashbo

Posted: Tue Nov 16, 2010 3:52 pm
by tjjansma
Thanks for the idea, but I tried that already.