Go Back   OXYLUS Flash Board > Support > Flash News Modules > RSS Feed News Reader

Reply
 
LinkBack Thread Tools Display Modes
Old 05-04-2008, 08:12 AM   #1 (permalink)
OYXLUSFlash.com Staff Member
 
Adrian's Avatar
 
Join Date: May 2008
Posts: 1,969
Send a message via Yahoo to Adrian Send a message via Skype™ to Adrian
Default

How to load a RSS feed

You only have to edit two lines of code:

1. Specify the url from where you want to pull the rss feed:

var RSSUrl = "rss url goes here";
this line is located inside the news.fla file, in the first frame.

2. Load the Feed
a. If the feed is located on the same domain use:

xml.load(RSSUrl);
this line is located inside the news.fla file, in the first frame.

b. If the feed is located on a diffrent domain use:

xml.load(domain+"news.php?url="+RSSUrl);
this line is located inside the news.fla file, in the first frame.
It should test this only on a server that supports php, it will not work locally. Upload both of the swf file and php files on your server.

Remove the other xml.load… lines. Don’t use them all at once. It will not work.
Leave the domain variable blank ( domain = ""; ).
Leave the php file intact, you don't have to edit it in any way.
Your server must have php support in order for this to work.

Last edited by Adrian; 06-07-2009 at 12:50 PM.
Adrian is offline   Reply With Quote
Old 10-24-2008, 03:29 PM   #2 (permalink)
Junior Member
 
Join Date: Oct 2008
Posts: 3
Default

i ve tried so many times but still didnt figure out how this works...

lets say my domain is:
PHP Code:
http://www.mysite.com 
then lets assume i want to get feeds from yahoo top stories:
PHP Code:
[http://rss.news.yahoo.com/rss/topstories 
news.php looks like this:

Quote:
<?php $url = $_GET["url"]; echo readfile($url); ?>
then news.fla looks like this:

Quote:
...
among all my tests i found this one is the most logical, can you plz help me and others suffering the same problem?

Thanx a lot in advance!

Last edited by Adrian; 06-07-2009 at 12:46 PM.
Makis77 is offline   Reply With Quote
Old 10-30-2008, 08:44 AM   #3 (permalink)
OYXLUSFlash.com Staff Member
 
Adrian's Avatar
 
Join Date: May 2008
Posts: 1,969
Send a message via Yahoo to Adrian Send a message via Skype™ to Adrian
Default

The problem is here:
Code:
http://www.adslspeed.com/rss/news.php?url=http://rss.news.yahoo.com/rss/topstories
it doesn't load the rss feed.

Take a look at this:
Code:
http://office.oxylus.ro/~adrian/news/news.php?url=http://rss.news.yahoo.com/rss/topstories
and this
Code:
http://office.oxylus.ro/~adrian/news/news.swf
and my php looks like this:
Code:
<?php $url = $_GET["url"]; echo readfile($url); ?>
There is something with the php script not working on your server. I can't debug this problem, I only deal with flash and I only know the basics of php programming. If the your php file doesn't look like this:
Code:
<?php $url = $_GET["url"]; echo readfile($url); ?>
please change it and it will work ok.

Last edited by Adrian; 06-07-2009 at 12:44 PM.
Adrian is offline   Reply With Quote
Old 10-30-2008, 04:36 PM   #4 (permalink)
Junior Member
 
Join Date: Oct 2008
Posts: 3
Default

My problem was solved.
My dedi server didnt allow URL file-access(it was disabled) so i couldnt load the rss feed from external urls.

For other people having the same problem i suggest you follow the instructions given in this topic and when done do the following:

type in your browser:
PHP Code:
http://www.yoursite.com/news.php?url=http://rss.news.yahoo.com/rss/topstories 
if you see results then everything is fine,
if you see the following errors:

Quote:
Warning: readfile() [function.readfile]: URL file-access is disabled in the server configuration in /home/yoursite/public_html/news.php on line 1

Warning: readfile(
PHP Code:
http://rss.news.yahoo.com/rss/topstories 
) [function.readfile]: failed to open stream: no suitable wrapper could be found in /home/yoursite/public_html/news.php on line 1
then you have the same problem as i did.

To fix it create a php.ini file and put inside the following line:

Quote:
allow_url_fopen = ON
Save it and then upload it under the same folder news.php is located.

I hope i ve helped a bit....
Makis77 is offline   Reply With Quote
Old 07-30-2009, 09:45 PM   #5 (permalink)
Junior Member
 
Join Date: Jul 2009
Posts: 4
Default Just followed directions still nothing

Its me.. just sent you an email. these are very basic instructions yet my file is not working. when i load my page i see that the loader starts to search for the rss but then blank.


http://devicemedia.net/news.swf


Do I have to upload the actionscript files?
devicemedia is offline   Reply With Quote
Old 08-01-2009, 09:20 PM   #6 (permalink)
Junior Member
 
Join Date: Aug 2009
Posts: 1
Default how do i edit this file

can anyone recommend software that is not going to cost me money for editing this file?
shapsta is offline   Reply With Quote
Old 08-27-2009, 04:50 PM   #7 (permalink)
Junior Member
 
Join Date: Jan 2009
Posts: 2
Default

Hey all,

Being that my server does not support PHP I took the news.php and quickly transformed it to ASP (news.asp). The code is as follows -

Code:
<%
Dim strUrl
strUrl = Request.Querystring("url")

set xmlhttp = server.CreateObject("Microsoft.XMLHTTP") 
xmlhttp.open "GET", strUrl, false 
xmlhttp.send "" 
Response.write xmlhttp.responseText 
%>
Enjoy!
tcameron is offline   Reply With Quote
Old 08-27-2009, 06:45 PM   #8 (permalink)
OYXLUSFlash.com Staff Member
 
Adrian's Avatar
 
Join Date: May 2008
Posts: 1,969
Send a message via Yahoo to Adrian Send a message via Skype™ to Adrian
Default

Thanks for sharing that with the community. We appreciate it !
Adrian is offline   Reply With Quote
Old 10-01-2009, 04:17 PM   #9 (permalink)
Junior Member
 
Join Date: Oct 2009
Posts: 1
Default ASP solution

My server also does not support PHP, so I am trying to get this component to work using the ASP file provided. Is there any change to the code in frame 1 of the FLA file that I'd need to make in order to load my RSS feed URL with the ASP code?

So far I am able to get the preloader, and a trace of 'successful' comes through when I test the file locally, but I cannot get the content of the RSS feed to load or show. Please help. Thanks.
BillLee is offline   Reply With Quote
Old 10-01-2009, 07:13 PM   #10 (permalink)
OYXLUSFlash.com Staff Member
 
Adrian's Avatar
 
Join Date: May 2008
Posts: 1,969
Send a message via Yahoo to Adrian Send a message via Skype™ to Adrian
Default

You cannot see anything locally. You must upload it to a server and access it by its address.
Adrian is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 05:50 AM.