PDA

View Full Version : RSS to PHP - error codes - experts required



dons1
03-14-2008, 03:09 PM
Hi all!

I want to add RSS updating news feeds but which are converted to php so that the SEs can read them.

After following the RSSFeedReeder instruction exactly, I ran the test and the following error messages appeared on my trial page.

Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /home/gqmphrw/public_html/rsssoccergossip.php on line 2

Parse error: syntax error, unexpected T_STRING in /home/gqmphrw/public_html/rsssoccergossip.php on line 2

This is the php code I uploaded to the above address:

<?php
$olderror_reporting =error_reporting(0);
include ("http://rssfeedreader.com/rss3/rss.php?url=http%3A%2F%2Fnews.google.com%2Fnews%3F hl%3Den%26ned%3Dus%26ie%3DUTF-%26output%3Drss%26q%3Dsoccer&newpage=1&chead=&atl=&desc=1&owncss=&eleminate=&auth=1&dts=1&width=400&max=10&tlen=0&rnd=1&bt=1&bs=None&nmb=&ntb=&naf=&nst=&nwd=600&nht=550&dlen=0&lstyle=-1&lc=Blue&bg=White&bc=%23FFFFFF&spc=&ims=1&tc=00005E&ts=9&tfont=Verdana,+Arial,+Sans-serif&rf=".$HTTP_SERVER_VARS['SERVER_NAME'].$HTTP_SERVER_VARS['PHP_SELF']."&phpout=1");
error_reporting($olderror_reporting);
?>

This is the code I copied into the trial page to bring up the news feed:

<!--#include virtual="/rsssoccergossip.php" -->

Now, I'm presuming that I followed the instructions correctly since the error message is about syntax and characters, rather than "could not find" or "could not process" etc.

I also followed the instructions re. Apache handler. and .htm and .html parsing.

Anybody any ideas?

Many thanks

John
www.clanfootball.com (http://www.clanfootball.com) "connecting fans around the world"

dons1
03-18-2008, 03:06 PM
I'll try again -- Can anybody help me?

Thanks in anticipation

John
www.clanfootball.com (http://www.clanfootball.com) "connecting fans around the world"

Watdaflip
03-18-2008, 07:06 PM
I don't see anything in line 2 to cause the error or warning. Is that the exact script you have on the page you uploaded to your site?

Karen Mac
03-18-2008, 07:54 PM
Im wondering if all those % signs are supposed to be in there. Copy your code from whatever page source, then to notepad, the select and copy to your page. The web creates % to fill spaces when u copy from webpages, and that may be the issue.

Karen

Watdaflip
03-18-2008, 08:01 PM
The &#37; are just encoded characters. It makes it safer to transmit information in a url, if the actual characters were used it would leave open vulnerabilities.

dons1
03-19-2008, 12:21 AM
Thanks Karen and Watdaflip,

I'm really grateful for your replies.

What I have up there is what I copied from the feed reader and pasted into Wordpad, where I saved as a .php file and uploaded.

I've just noticed that there are some "spaces" in the code, e.g. .....reporting =error..... and .......include ("http://....., and also in the "string" itself.

Could this be it?

Again, many thanks

John
www.clanfootball.com (http://www.clanfootball.com) "connecting fans around the world"

Watdaflip
03-19-2008, 12:50 AM
The space in " $olderror_reporting =error_reporting(0);" doesn't make any different, and the space in the string won't cause an error, it might matter with how rssfeadreader.com handles how your feed is displayed, but even then I would hope they thought ahead enough to trim white spaces if they matter

fadikaouk
05-19-2008, 12:19 AM
I am having the same problem... in my case, I have NOTHING, not even an error :)

I am using the codes from http://rssfeedreader.com (http://rssfeedreader.com/)

The code that was provided is:
<?php
$olderror_reporting =error_reporting(0);
includeed ("http://rssfeedreader.com/rss3/rss.php?url=&newpage=1&chead=1&atl=1&desc=1&owncss =&eleminate=&auth=1&dts=1&width=300&max=5&tlen=0&r nd=1&bt=3&bs=Double&nmb=&ntb=&naf=&nst=&nwd=300&nh t=250&dlen=0&lstyle=-1&lc=Blue&bg=White&bc=%23FF6600&spc=&ims=&tc=&ts=1 1&tfont=Verdana,+Arial,+Sans-serif&rf=".$HTTP_SERVER_VARS['SERVER_NAME'].$HTTP_SERVER_VARS['PHP_SELF']."&phpout=1");
error_reporting($olderror_reporting);
?>


1. I have Defined the Apache Handlers to:
.htm server-parsed
.html server-parsed

2. I saved this as rssfeed.php
3. I have published it to: public_html/
4. I have created a test page: www.kgcinternational.com/test.html (http://www.kgcinternational.com/test.html)
5. I have included the following html code in that page: <!--#include virtual="/rssfeed.php" -->
6. I saved and published this page online

No FEEDS?

Any expert on this matter?

Watdaflip
05-19-2008, 12:36 AM
When you just visit the page in your browser does it show the feed (I don't mean on the page you are trying to use SSI with, but when you visit rssfeed.php itself)

fadikaouk
05-19-2008, 01:01 AM
No it does not. The file is simply a code provided by rssfeedreader.com

When you go to kgcinternationa.com/reefeed.php nothing happens... is there anything that should happen?