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
Converting google spreadsheet for use in xcelsius dashboard
Moderator: General Moderators
Re: Converting google spreadsheet for use in xcelsius dashbo
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
Thanks for the response.
I'll look into what's happening when I run it.
I'll look into what's happening when I run it.
Re: Converting google spreadsheet for use in xcelsius dashbo
Can you post line 10 and some of the surrounding lines?
Re: Converting google spreadsheet for use in xcelsius dashbo
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?
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
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
Thanks for the idea, but I tried that already.