Google+ API Embedded Posts (Javascript && PHP)! Issues?

Havng issues with getting one of these methods to work for this site I have?

Example code allocated for implementation on website:

Source Code:

Anyhelp would b appreciated! :slight_smile:


What issues are you having?


I have been looking 4 a script to get RSS feed 4 my site.

I just found a new one and would like 2 use this instead of the other ones.

Getting error msg:

Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in D:\Hosting\10140828\html\gbot\feed.php on line 9

Any help would b appreciated! :slight_smile:

header('Content-type: text/xml');
$gendate = date('r', time());
$config = array(
	'gplusid' 	=> '108889088632131119238',
	'gplusname' => 'Robert Rodriguez',
	'hosturl' 	=> 'http://'
$data = file_get_contents("[1,2,$config['gplusid'],null,null,10,null,\"\",[]]");
//remove first shits
$parsed = str_replace(")]}'", "", $data);
$parsed = str_replace('[,' , '["",' , $parsed);
$parsed = str_replace(',,' , ',"",' , $parsed);
$parsed = str_replace(',,' , ',"",' , $parsed);
$parsed_data 	= json_decode($parsed);
$stream 		= $parsed_data[0][1][0];
echo '<?xml version="1.0" encoding="UTF-8"?>';
<rss version="2.0"

	<title><?= $config['gplusname'] ?> on Google+</title>
	<atom:link href="<?= $config['hosturl'] ?>" rel="self" type="application/rss+xml" />
	<link><?= $config['gplusid'] ?>/posts</link>
	<description><?= $config['gplusname'] ?> has a Google+ account, and he's making an RSS feed of his postings there</description>
	<lastBuildDate><?= $gendate ?></lastBuildDate>
	<generator><?= $config['gplusname'] ?>'s G+ RSS generator</generator>
<?php for($a = 0; $a < 10; $a++): ?>
		<title><?= $stream[$a][4] ?></title>
		<link><?= $stream[$a][21] ?></link>
		<comments><?= $stream[$a][21] ?>#comments</comments>
		<pubDate><?= date('r', (int)($stream[$a][5] / 1000) ?></pubDate>
		<dc:creator><?= $config['gplusname'] ?></dc:creator>
		<description><![CDATA[<?= isset($stream[$a][11][0][3]) ? $stream[$a][11][0][3] : '' ?>]]></description>
<?php endfor; ?>
1 Like

Here is the link:

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.