![]() |
|
|
|||||||
![]() |
|
|
Thread Tools | Rate Thread |
|
|
PM User | #1 |
|
Senior Coder ![]() Join Date: Jun 2008
Location: Cornwall
Posts: 1,612
Thanks: 231
Thanked 12 Times in 12 Posts
![]() |
Hi All,
I have suscribed to some rss feeds and can view in windows live mail but how do i get my website to display the rss feeds? here is one of the feeds url http://ax.phobos.apple.com.edgesuite...15427%26url%3D i know very little about rss, ![]() i will also be calling these feeds from a database, so depending on which page is loaded the relivant feed is shown. many thanks Luke |
|
|
|
|
|
PM User | #2 |
|
Senior Coder ![]() Join Date: Apr 2004
Location: Toronto, Ontario
Posts: 1,766
Thanks: 12
Thanked 82 Times in 82 Posts
![]() |
have a look here: http://us2.php.net/manual/en/simplexml.examples.php
|
|
|
|
|
|
PM User | #3 |
|
Senior Coder ![]() Join Date: Jun 2008
Location: Cornwall
Posts: 1,612
Thanks: 231
Thanked 12 Times in 12 Posts
![]() |
hi thanks for your reply, unfortunatly that link looks way to complex. plus i dont know how to get the xml file?
i dont know anything about rss, so please make everything as basic as possible ![]() thanks |
|
|
|
|
|
PM User | #4 |
|
Master Coder ![]() Join Date: Jun 2003
Location: Cottage Grove, Minnesota
Posts: 5,228
Thanks: 4
Thanked 414 Times in 412 Posts
![]() ![]() |
This is the simplest example I could come up with:
PHP Code:
We of course are not sure of what XML tags you are interested in.
__________________
. |
|
|
|
|
|
PM User | #5 |
|
Regular Coder ![]() Join Date: Nov 2006
Posts: 601
Thanks: 1
Thanked 2 Times in 2 Posts
![]() |
ok i quickly typed this up for you...simple enough .. ok
call your file rss.php or what ever you want PHP Code:
Now you have to edit your .htaccess file =P Please add the code below so that instead of rss.php you could use news.xml or something else. Code:
RewriteEngine On RewriteRule ^(.*).xml$ rss.php |
|
|
|
|
|
PM User | #6 |
|
Master Coder ![]() Join Date: Jun 2003
Location: Cottage Grove, Minnesota
Posts: 5,228
Thanks: 4
Thanked 414 Times in 412 Posts
![]() ![]() |
RunnerJP ...
I think they are looking for an RSS "Reader", not "Feeder". But I like your feed example and may play with that one myself ... thanks for posting.
__________________
. |
|
|
|
|
|
PM User | #8 | ||
|
Senior Coder ![]() Join Date: Jun 2008
Location: Cornwall
Posts: 1,612
Thanks: 231
Thanked 12 Times in 12 Posts
![]() |
Quote:
)your above code im getting an error: Fatal error: Call to undefined function curl_init() in C:\wamp\www\Affiliate\rss.php on line 14 Quote:
think i had better use them all until i get a feel for what im doing ![]() thanks for you help so far much appreciated Luke |
||
|
|
|
|
|
PM User | #9 |
|
Senior Coder ![]() Join Date: Jun 2008
Location: Cornwall
Posts: 1,612
Thanks: 231
Thanked 12 Times in 12 Posts
![]() |
thanks for your code runnerjp but apparently its not what im looking for, i wouldnt have known if mlseim hadnt said
![]() but thanks for trying to help i appreciate it.
|
|
|
|
|
|
PM User | #10 |
|
Master Coder ![]() Join Date: Jun 2003
Location: Cottage Grove, Minnesota
Posts: 5,228
Thanks: 4
Thanked 414 Times in 412 Posts
![]() ![]() |
Your server (or webhost) must not have PHP CURL installed or enabled.
A web site that provides RSS feeds use their database to create an XML file. The URL you gave us in the first post is a URL to their XML file. The XML file is a specific set of tags that define XML. An RSS reader opens that XML file and reads the fields (or tags) you're interested in knowing. Once you read the tags, they can be displayed on your web page. You might ask ... "why would a web site give out information for people to use on their own web site?" The answer is, with RSS, there are usually links back to the source. So, it gives them links to their site, and some added traffic. Here's an RSS feed I use to generate a little weather thing on a web page: http://www.catpin.com/weather Use Google to search more about RSS feeds. About your script failing ... contact your web host about PHP CURL.
__________________
. |
|
|
|
|
|
PM User | #12 |
|
Master Coder ![]() Join Date: Jun 2003
Location: Cottage Grove, Minnesota
Posts: 5,228
Thanks: 4
Thanked 414 Times in 412 Posts
![]() ![]() |
Luke ...
That might be it ... upload to a webhost and the CURL would work. Most hosts now have CURL enabled. More about XML ... http://www.xml.com/pub/a/98/10/guide0.html?page=2#AEN66
__________________
. |
|
|
|
|
|
PM User | #14 |
|
Master Coder ![]() Join Date: Jun 2003
Location: Cottage Grove, Minnesota
Posts: 5,228
Thanks: 4
Thanked 414 Times in 412 Posts
![]() ![]() |
See if this works on your server ....
PHP Code:
__________________
. |
|
|
|
| Users who have thanked mlseim for this post: | LJackson (10-16-2008) |
|
|
PM User | #15 |
|
Senior Coder ![]() Join Date: Jun 2008
Location: Cornwall
Posts: 1,612
Thanks: 231
Thanked 12 Times in 12 Posts
![]() |
![]() ![]() ![]() Yes mate it does thank you so much for this i really appreciate it. is it possible to get the images to show up as well? if its not too much of a pain in the arse. cheers mate your a star!!!!!!! |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Rate This Thread | |
|
|