PDA

View Full Version : How to Add PHP RSS Feeds to Your Web Page.



Theopod
07-18-2006, 05:24 PM
Hello, i am trying to add a news feed to one of my web pages and i can't get it to work. I followed the instructions from the feed reader provider to a T, but to no avail. Could someone please help me with this!

Here is the url for the install instructions: http://rssfeedreader.com/php.html#HTML

and below is the php code that was given to me by the RSS reader:

<?php
$olderror_reporting =error_reporting(0);
include ("http://www.rssfeedreader.com/rss3/rss.php?url=http%3A%2F%
2Fnews.google.com%2Fnews%3Fhl%3Den%26ned%3Dus%26ie %3DUTF-%26output%
3Drss%26q%3Dpoker%2Chttp%3A%2F%2Fnews.search.yahoo .com%2Fusns%
2Fynsearch%2Fcategories%2Fnews_story_search_rss%2F index.html%3Fp%
3Dpoker%2Chttp%3A%2F%2Fsearch.msn.com%2Fnews%2Fres ults.aspx%3Fformat%
3Drss%26FORM%3DRSNR%26q%
3DPOKER&newpage=1&chead=1&atl=1&desc=1&owncss=&eleminate=&auth=&dts=&w
idth=575&max=20&tlen=0&rnd=1&bt=3&bs=None&nmb=&ntb=&naf=&nst=&nwd=600&
nht=0&dlen=0&lstyle=1&lc=%23FF0000&bg=%23000000&bc=%
23000000&spc=&ims=1&tc=%
2366FFCC&ts=11&tfont=Tahoma,+Verdana&rf=".$HTTP_SERVER_VARS
['SERVER_NAME'].$HTTP_SERVER_VARS['PHP_SELF']."&phpout=1");
error_reporting($olderror_reporting);
?>

Theopod
07-19-2006, 04:56 PM
Hi, regarding my problem with my php rss news feed, i found some information about cron commands for apache servers. Is anyone familiar with cron commands? Below is a list of 10 different cron commands that might execute php scripts on Voda server.
1) Where would i install these scripts? (HTML box on the page i want the news feed)
2)I'm not sure, but doesn't it appear that portions of the scripts below are missing? ( < > )

Apache Server Cron Commands
These are 10 cron commands that we know of that can be used on Apache
servers. if none of the commands below work then we suggest
contacting your host support and asking them for the correct cron
command that wil execute php scripts on their server.

If that fails your other options are to use our free bonus tool
EZcron
http://visualcron.com (http://visualcron.com/) (A desktop cron solution)
http://webbasedcron.com (http://webbasedcron.com/) (An outside cron service)


1. /usr/local/bin/php /home/username/public_html/post/post.php

2. GET http://www.domain.com/post/post.php > /dev/null

3. lynx -dump http://domainname.com/post/post.php > /dev/null

4. curl http://www.domain.com/post/post.php > /dev/null

5. php public_html/post/post.php

6. php -q /home/USERNAME/public_html/post/post.php

7. cd /home/ USERNAME /public_html/post ; /usr/local/bin/php /home/
USERNAME /public_html/post/post.php

8. php -f /home/www/index.php

9. php -q /home/username/www/RSS2B3/post.php

10. POST http://www.domain.com/post/post.php > /dev/null

Theopod
07-21-2006, 03:16 AM
Howdy! My news feed came with two options. Java script or php. I installed the java and it works fine, but the problem is that java isn't search engine friendly. Php can actually improve your search engine ranking, because fresh content is added regularly and search engines will spider it more often. I would still like to install the php rss feed. So if anyone can help, please respond to this thread.

Many thanks, Theopod. Check out the page! http://www.freerollhaven.com/pkrnews.html

Theopod
08-15-2006, 05:33 PM
Anyone know how to install php?

Theopod
08-16-2006, 05:41 AM
Sorry for keeping this thread active, but i really want solve this problem! The following is the error i keep getting on my web page when i try to install the rssfeeds.php
[an error occurred while processing this directive]
I follow the install instructions and try different variations, but it just wont work.
I saved the php code on notepad and named it rssfeeds.php. I then went into cpanel and opened file manager and uploaded the rssfeeds.php into my public_html folder. I opened apache handlers in cpanel then changed the .htaccess by adding .htm and .html server-parsed. I then added the ssi <!--#include virtual="/rssfeeds.php" --> to an html box on my web page and published the page. "Doesn't work" The instructions below say to save the rssfeeds.php file to my root folder and upload to server. Is my root folder my public_html folder. Maybe this is where i went wrong. How do i save the rssfeeds.php into my root folder and upload to server?

Add the PHP code that was given to you by the RSS reader in to the blank rssfeeds.php file and save it in your root folder and upload it to your server. There should nothing else in the file except the code that was given to you by the reader.

Theopod
08-19-2006, 03:39 PM
??

Andy128
08-19-2006, 04:22 PM
You are a *******! Your not being ignored- it's just I think you are the first one to actually incorporate this into a BV website. I know I haven't seen much about php rss feeds.

Hope you get it figured.

Andy

allstarfaces
08-19-2006, 04:36 PM
i tried a while back and failed i dont think the servers work with the normal rss feeds i.e news reels etc in php or any other ????? not sure why something to do with it being apache maybe i read in a rss feed provider page if you find out let me know thanks

Theopod
08-19-2006, 10:18 PM
Thanks for responding Andy and Allstar! Thought for sure i was alone in here! lol. The strange thing, Allstar, is that the instructions for install are for an Apache server which BV seems to be. In C-panel there is an apache handler icon you can click on to change your .ht access. An even stranger thing is that i submitted a ticket to customer support and not even they can help me. You'd think that customer support would have some computer super geeks on the payroll full time 24/7 to help "customers" with problems other than how and where to pay for your domain! If the people who sold me the server space can't help me, who can? lol

Vasili
08-19-2006, 10:55 PM
Theo...

Here is a thread with a similar discussion (which was found extremely easy via "Search the Forum") which may offer you some insight : http://www.vodahost.com/vodatalk/adding-elements-your-website/59-do-you-support-streaming-media-video-audio.html#post30145

If this doesn't do the trick, the maybe you can search specifically using different key words??
The answers are out there, if you look for them!

Theopod
08-19-2006, 11:03 PM
Thanks Vasilli, but i'm not trying to add an audio or video stream? I'm trying to add php script!

Theopod
08-19-2006, 11:11 PM
http://www.freerollhaven.com/bv01022.gif

And yes Vasilli i have searched the forum and it was extremely easy! lol. I used php as a my keyword, but i couldn't find a solution. I found similar problems, but no solution.

Vasili
08-19-2006, 11:54 PM
You need to hook up with our resident script Guru's: Naval, Andy128, FRRob, Nyomen, and Whatdaflip......search them out in Member List, shoot them an email. Whatdaflip is semi-pro, so maybe starting there?

Nyoman
08-20-2006, 02:26 PM
It should work,
check your rssfeed.php. and make sure there are no space in between. make it like this:

<?php
$olderror_reporting =error_reporting(0);
include
("http://www.rssfeedreader.com/rss3/rss.php?url=http%3A%2F%2Fnews.google.com%2Fnews%3F hl%3Den%26ned%3Dus%26ie%3DUTF-%26output%3Drss%26q%3Dpoker%2Chttp%3A%2F%2Fnews.se arch.yahoo.com%2Fusns%2Fynsearch%2Fcategories%2Fne ws_story_search_rss%2Findex.html%3Fp%3Dpoker%2Chtt p%3A%2F%2Fsearch.msn.com%2Fnews%2Fresults.aspx%3Ff ormat%3Drss%26FORM%3DRSNR%26q%3DPOKER&newpage=1&chead=1&atl=1&desc=1&owncss=&eleminate=&auth=&dts=&width=575&max=20&tlen=0&rnd=1&bt=3&bs=None&nmb=&ntb=&naf=&nst=&nwd=600&nht=0&dlen=0&lstyle=1&lc=%23FF0000&bg=%23000000&bc=%23000000&spc=&ims=1&tc=%2366FFCC&ts=11&tfont=Tahoma,+Verdana&rf=".$HTTP_SERVER_VARS['SERVER_NAME'].$HTTP_SERVER_VARS['PHP_SELF']."&phpout=1");
error_reporting($olderror_reporting);
?>
upload the php.file above to your root directory (public_html).
in control panel 'Apache Handler' make sure you add .htm server-parsed and .html server-parsed
and then you call your newsfeed through your page by adding <!--#include virtual="/rssfeeds.php" --> in html box and place it wherever you want.

Try!!!!!

Vasili_ I am not a Guru http://www.vodahost.com/vodatalk/images/icons/icon10.gif, you are so funny

Theopod
08-20-2006, 08:52 PM
Hi Nyoman, sorry for taking so long to respond. I did everything you asked. I copied and pasted the php code you gave me in notepad and named it rssfeeds.php. I then uploaded the file to my public_html folder. I added the .htm and .html server-parsed I added the html box (<!--#include virtual="/rssfeeds.php" -->) on the page i wanted it to display and published. Still getting the error below.
[an error occurred while processing this directive]

Nyoman
08-22-2006, 02:10 AM
I tried in my page (http://cyberzone.web.id/feedreader.html) with the same code as above and it is working. Maybe you did something wrong. Did you edit your.htaccess by chance? if you add extension handler in control panel you don't need to edit your .htaccess.
still getting Error?
try to put (<!--#include virtual="/rssfeeds.php" -->) in new blank page. and if this is working means you have conflic code in your previous page

Theopod
08-22-2006, 03:11 PM
Hi Nyoman, I tried on a new page with the same result. I don't know what the hell is going on. I edited my .htaccess with .htm and .html server-parsed. I uploaded the rssfeeds.php to my public_html and put the (<!--#include virtual="/rssfeeds.php" -->) into a html box on the new page.
1) When you say "if you add extension handler in control panel you don't need to edit your .htaccess." What do you mean and how do i do that?

2) When i upload the rssfeeds.php file into the public_html folder it is saved as rssfeeds.php.txt. Is this normal?

Nyoman
08-23-2006, 01:28 AM
Hi Theo

I means once you add .htm server-parsed and .html server-parsed in control panel (apache handler) you don't need edit and add anything to your .htaccess anymore.
No that is not correct php file should be in .php extension. make sure you when you save in notepad save as rssfeeds.php and not as rssfeeds.php. (this last dot will save your file with .txt extension) Or you can log to your public_html and rename the rssfeeds.php.txt. to rssfeeds.php

Theopod
08-24-2006, 02:47 AM
Hi Nyoman, I went into my public_html folder and renamed the file to get rid of the .txt once before and it still wouldn't work. I also tried putting the file in a folder named rssfeeds.php, but still no go. If i was to give you access to my cpanel, would you be interested in poking around to try to find something unusual!

Nyoman
08-24-2006, 04:16 AM
If you wish, you can send me your log in info here (http://heavenlytemple-studio.com/index.php?option=com_contact&Itemid=3) , i will try to figure it out

Nyoman
08-25-2006, 12:48 AM
Theo-
Got your Email and you have mail too

sbrenusa
09-25-2007, 01:41 AM
This was my exact problem. How did you solve it?

lunatunes
10-22-2007, 04:37 AM
This is my exact problem also.
Please, Please......Tell us if you came up with a solution!! :)..lol

Thanks,
Randy

ianric
04-06-2008, 04:15 PM
Hi I am having the same problem. Did anybody find out how this was solved?
Ian.

dons1
04-17-2008, 11:49 PM
Hi All!

I think it's worth me keeping this going, because I have exactly the same problem, and, as it seems to have been resolved, one would expect that the solution would have been shared. I thought that was the idea of the Forum.

So, Theopod and / or Nyoman, how did you crack it, please?

Regards
John
www.soccer-tricks.clanfootball.com (http://www.soccer-tricks.clanfootball.com)
www.soccer-drills.clanfootball.com (http://www.soccer-drills.clanfootball.com)
www.history-of-soccer.clanfootball.com (http://www.history-of-soccer.clanfootball.com)

fadikaouk
05-17-2008, 04:59 AM
Hello there,

I have tried everything said above by Nyoman (http://www.vodahost.com/vodatalk/members/nyoman.html) but it does not work.

I have changed the Cpanel

User Defined Handlers .htmserver-parsed .htmlserver-parsed System Defined Handlers .cgi .plcgi-script .php .php4 .php3application/x-httpd-php .shtmlserver-parsed
I have saved the following code as rssfeeds.php and transfer it into my public_html/:

<?php
$olderror_reporting =error_reporting(0);
include
("http://www.rssfeedreader.com/rss3/rss.php?url=http%3A%2F%2Fnews.google.com%2Fnews%3F hl%3Den%26ned%3Dus%26ie%3DUTF-%26output%3Drss%26q%3Dpoker%2Chttp%3A%2F%2Fnews.se arch.yahoo.com%2Fusns%2Fynsearch%2Fcategories%2Fne ws_story_search_rss%2Findex.html%3Fp%3Dpoker%2Chtt p%3A%2F%2Fsearch.msn.com%2Fnews%2Fresults.aspx%3Ff ormat%3Drss%26FORM%3DRSNR%26q%3DPOKER&newpage=1&chead=1&atl=1&desc=1&owncss=&eleminate=&auth=&dts=&width=575&max=20&tlen=0&rnd=1&bt=3&bs=None&nmb=&ntb=&naf=&nst=&nwd=600&nht=0&dlen=0&lstyle=1&lc=%23FF0000&bg=%23000000&bc=%23000000&spc=&ims=1&tc=%2366FFCC&ts=11&tfont=Tahoma,+Verdana&rf=".$HTTP_SERVER_VARS['SERVER_NAME'].$HTTP_SERVER_VARS['PHP_SELF']."&phpout=1");
error_reporting($olderror_reporting);
?>

have created a test page: www.kgcinternational.com/test.html (http://www.kgcinternational.com/test.html)

Have also included the html code in that page: <!--#include virtual="rssfeeds.php" -->

NOTHING???

anyone can help?

gprevor
01-30-2009, 03:02 PM
I am trying to add a newsfeed php script to a website. I have been reading this thread and cant seem to find any resolution to my issue either.
The source of my free newsfeed is www.newsfeedmaker.com (http://www.newsfeedmaker.com) they provide various free formats to receive/display the feed.
I think many members of this forum would like to have newsfeeds on their sites - so if someone could try and find a way to make these newsfeeds work it would benefit a lot of us.
It is free to open an account and they have newsfeeds available with hundreds of topics -
so please someone try and see if you can make it work and report back to this thread if you have success.
Thanks