Irish SEO,  Marketing & Webmaster Discussion

 

Setting up rss feeds

This is a discussion on Setting up rss feeds within the Coding Help forums, part of the Webmaster Help category; cheers for the link Code: <?php require_once 'rss_fetch.inc'; $url = 'http://news.bbc.co.uk/ rss /newsonline_uk_edition/northern_ireland/rss091. xml '; $ rss = fetch_rss($url); $items ...


Go Back   Irish SEO, Marketing & Webmaster Discussion > Webmaster Help > Coding Help

Register Forum Rules FAQDonate Members List Calendar Search Today's Posts Mark Forums Read


Notices

Reply

 

LinkBack Thread Tools Display Modes
  #11 (permalink)  
Old 20-12-2007, 03:23 PM
Forbairt's Avatar
respect my AW-THOR-IT-AYY
 
Join Date: Jun 2007
Location: My Office, Dublin
Posts: 1,775
Nominated 2 Times in 1 Post
TOTW/F/M Award(s): 0
Forbairt has a reputation beyond reputeForbairt has a reputation beyond reputeForbairt has a reputation beyond reputeForbairt has a reputation beyond reputeForbairt has a reputation beyond reputeForbairt has a reputation beyond reputeForbairt has a reputation beyond reputeForbairt has a reputation beyond reputeForbairt has a reputation beyond reputeForbairt has a reputation beyond reputeForbairt has a reputation beyond repute
Send a message via AIM to Forbairt Send a message via MSN to Forbairt Send a message via Yahoo to Forbairt Send a message via Skype™ to Forbairt
Default

cheers for the link


Code:
<?php
require_once 'rss_fetch.inc';
$url = 'http://news.bbc.co.uk/rss/newsonline_uk_edition/northern_ireland/rss091.xml';
$rss = fetch_rss($url);
$items = array_slice($rss->items, 0, 5);
echo "Site: ", $rss->channel['title'], "<br>\n";
foreach ($items as $item ) {
$title = $item[title];
$url = $item[link];
$description = $item[description];
echo "<a href=$url>$title</a><br>$description</li><br>\n";
}
?>
What we did was chop the 5 entries out into an array called $items

As such we have to change our foreach statement

enjoy
__________________
Forbairt Media | Web Design & Development Galway / Dublin, Ireland - coming soon ... ( vague but descriptive isn't it )
Recent Work: Safari Club African Safari Holidays - South Africa Safaris
Other Stuff: FluffyLinkulator Rapid Inclusion Service Tools
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #12 (permalink)  
Old 20-12-2007, 03:34 PM
Frontpage User
 
Join Date: Dec 2007
Posts: 24
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
Big D will become famous soon enough
Default Merci beaucoup!

Forbairt, you're a wizard - thank you SO much!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #13 (permalink)  
Old 20-12-2007, 03:39 PM
Forbairt's Avatar
respect my AW-THOR-IT-AYY
 
Join Date: Jun 2007
Location: My Office, Dublin
Posts: 1,775
Nominated 2 Times in 1 Post
TOTW/F/M Award(s): 0
Forbairt has a reputation beyond reputeForbairt has a reputation beyond reputeForbairt has a reputation beyond reputeForbairt has a reputation beyond reputeForbairt has a reputation beyond reputeForbairt has a reputation beyond reputeForbairt has a reputation beyond reputeForbairt has a reputation beyond reputeForbairt has a reputation beyond reputeForbairt has a reputation beyond reputeForbairt has a reputation beyond repute
Send a message via AIM to Forbairt Send a message via MSN to Forbairt Send a message via Yahoo to Forbairt Send a message via Skype™ to Forbairt
Default

no problem ...

all part of the service here at Irish Webmaster Forum
__________________
Forbairt Media | Web Design & Development Galway / Dublin, Ireland - coming soon ... ( vague but descriptive isn't it )
Recent Work: Safari Club African Safari Holidays - South Africa Safaris
Other Stuff: FluffyLinkulator Rapid Inclusion Service Tools
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #14 (permalink)  
Old 21-12-2007, 01:04 PM
ghost's Avatar
Wannabe Geek
 
Join Date: Dec 2007
Location: Ennis
Posts: 158
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
ghost will become famous soon enough
Default Any explanation for this behavior

Any explanation for this behavior
the following feed is from RTE
RTE Sport News
the two I am curious about
1 St Vincent's 2-08 Tyrrellspass 0-07
2 O?Connor appointed to Kerins O?Rahillys post

Source code for no 2
<h1>O'Connor appointed to Kerins O'Rahillys post</h1>
question why in the second case was the apostrophe converted to ?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #15 (permalink)  
Old 21-12-2007, 01:19 PM
Frontpage User
 
Join Date: Dec 2007
Posts: 24
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
Big D will become famous soon enough
Default No idea

I wish I could help on this one, but it is beyond me - the apostrophes seem to be working in some items but not in others -strange.

Hopefully someone with a bit more savvy can provide an answer
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #16 (permalink)  
Old 21-12-2007, 01:19 PM
Forbairt's Avatar
respect my AW-THOR-IT-AYY
 
Join Date: Jun 2007
Location: My Office, Dublin
Posts: 1,775
Nominated 2 Times in 1 Post
TOTW/F/M Award(s): 0
Forbairt has a reputation beyond reputeForbairt has a reputation beyond reputeForbairt has a reputation beyond reputeForbairt has a reputation beyond reputeForbairt has a reputation beyond reputeForbairt has a reputation beyond reputeForbairt has a reputation beyond reputeForbairt has a reputation beyond reputeForbairt has a reputation beyond reputeForbairt has a reputation beyond reputeForbairt has a reputation beyond repute
Send a message via AIM to Forbairt Send a message via MSN to Forbairt Send a message via Yahoo to Forbairt Send a message via Skype™ to Forbairt
Default

At a glance ... I'd say you've not defined your encoding for the page ?
__________________
Forbairt Media | Web Design & Development Galway / Dublin, Ireland - coming soon ... ( vague but descriptive isn't it )
Recent Work: Safari Club African Safari Holidays - South Africa Safaris
Other Stuff: FluffyLinkulator Rapid Inclusion Service Tools
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #17 (permalink)  
Old 21-12-2007, 01:19 PM
ghost's Avatar
Wannabe Geek
 
Join Date: Dec 2007
Location: Ennis
Posts: 158
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
ghost will become famous soon enough
Default And from the Irish Examiner sport

And from the Irish Examiner sport
Examiner Sport News
Quotation marks are displayed as ?
GAA due to ?serious? challenges to its amateur status.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #18 (permalink)  
Old 21-12-2007, 01:30 PM
Forbairt's Avatar
respect my AW-THOR-IT-AYY
 
Join Date: Jun 2007
Location: My Office, Dublin
Posts: 1,775
Nominated 2 Times in 1 Post
TOTW/F/M Award(s): 0
Forbairt has a reputation beyond reputeForbairt has a reputation beyond reputeForbairt has a reputation beyond reputeForbairt has a reputation beyond reputeForbairt has a reputation beyond reputeForbairt has a reputation beyond reputeForbairt has a reputation beyond reputeForbairt has a reputation beyond reputeForbairt has a reputation beyond reputeForbairt has a reputation beyond reputeForbairt has a reputation beyond repute
Send a message via AIM to Forbairt Send a message via MSN to Forbairt Send a message via Yahoo to Forbairt Send a message via Skype™ to Forbairt
Default

can you post your php code ?


This ...
Code:
<?php
require_once 'rss_fetch.inc';

$url = 'http://www.rte.ie/rss/sport.xml';
$rss = fetch_rss($url);
$items = array_slice($rss->items, 0, 5);
echo "Site: ", $rss->channel['title'], "<br>\n";
foreach ($items as $item ) {
$title = $item[title];
$url = $item[link];
$description = $item[description];
echo "<a href=$url>$title</a><br>$description</li><br>\n";
}
?>
works fine for me ... everything displaying correctly
__________________
Forbairt Media | Web Design & Development Galway / Dublin, Ireland - coming soon ... ( vague but descriptive isn't it )
Recent Work: Safari Club African Safari Holidays - South Africa Safaris
Other Stuff: FluffyLinkulator Rapid Inclusion Service Tools
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #19 (permalink)  
Old 21-12-2007, 01:57 PM
ghost's Avatar
Wannabe Geek
 
Join Date: Dec 2007
Location: Ennis
Posts: 158
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
ghost will become famous soon enough
Default RSS Test

Used the code you posted for Big D
I just ran the code in my own server to test it.
I have used Last Rss on a few sites and I get a lot of this type of stuff the quotations in the Examiner site just made me drop it altogether.
I don't know if this is an encoding problem , as you can see here apostrophes are showing in some instances and not in others
just curious to know why.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #20 (permalink)  
Old 21-12-2007, 02:17 PM
ghost's Avatar
Wannabe Geek
 
Join Date: Dec 2007
Location: Ennis
Posts: 158
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
ghost will become famous soon enough
Default last Rss

I have Last Rss working here just useing titles
StColumba's hurling Club Galway
might notice the header on the right for independent.ie/sport/ is missing had to remove due to @?^*.
I might have a look at magpie tonight looks like a sub for me.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
feeds, rss, setting

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
Forum Jump

Similar Threads

Thread Thread Starter Forum Replies Last Post
rss feed or newsletter Busarus Webmaster Discussion 4 02-03-2007 09:29 PM
RSS feeds ph3n0m Forum Feedback, Development and Competitions 6 31-01-2007 12:39 AM
1 Bag of RSS feed: 100% RDA of internet. Warning: may contain nut traces. gary.b General Chat 15 29-01-2007 10:03 PM
Web RSS readers Cormac Webmaster Discussion 3 18-10-2006 01:26 PM
rss feed louie General Chat 0 29-04-2006 08:18 PM


All times are GMT +1. The time now is 01:16 AM.


Powered by: vBulletin Version 3.7.3, Copyright ©2000 - 2008, Jelsoft Enterprises Limited.
Hosted in Ireland by Blacknight - Test your ISP |Irish Hosting Directory| Armchair.ie|Logo by Eden Web Design|Avatars by Afterglow |Latest Blog Entries | VPS HostingAd Management by RedTyger

Search Engine Friendly URLs by vBSEO 3.2.0