Warning: session_start() [function.session-start]: open(/home/web/wno19625/.tmp/sess_bd363cc37fd770abea92b73209bfe80d, O_RDWR) failed: Permission denied (13) in /usr/home/web/wno19625/rssarticles/comment/include/session.class.inc.php on line 69

Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /usr/home/web/wno19625/rssarticles/comment/include/session.class.inc.php:69) in /usr/home/web/wno19625/rssarticles/comment/include/session.class.inc.php on line 69

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /usr/home/web/wno19625/rssarticles/comment/include/session.class.inc.php:69) in /usr/home/web/wno19625/rssarticles/comment/include/session.class.inc.php on line 69
Integrate RSS feeds to your page with PHP

 

Web, RSS, traffic and money making Information

 

Menu: 15 Tips blog traffic - What are RSS feeds - Marketers should Blog - Integrate RSS on your Blog/page - Include Files PHP

Google

Integrate RSS feeds to your page with PHP

by: Mats Holmvik

Always wanted more content on your page? Then here is the solution! Integrate RSS feeds from others into your site, make it appear like you are serving the fresh news. So lets get started.

RSS

First of all this is going to be as easy as possible. We first need a PHP script that gets and parses the feed we are going to use. Todays choice was Magpierss-0.72. You can download it direct from here. You need winrar or some other advanced zip like tool to unpack the files. Once downloaded you just unpack all the files, upload it to your webserver and puts it in a directory named magpierss-0.72.

So we have to create the reader.php file, you can name it whatever you want but remember that it has to be a *.php file. Put in the code below, change the $URL variable with whatever feed you want and save the file, upload it next to the magpierss-0.72 folder and goto yoursite.com/reader.php. Now you see the magic happens, then you can use basic php->include() function to put it on your front page or other places you want it. Experiment and make it look lite the post you allready have on your page! :) Enjoy!

Here is the code of reader.php:


<div class="content">

<?php

require_once("magpierss-0.72/rss_fetch.inc"); # Here you define where magpie is.
define('MAGPIE_OUTPUT_ENCODING', 'utf-8'); # Choose your encoding
$url = "http://www.pixel2life.com/feeds/latest_15_tuts.xml"; # Define where the feed is, i picked pixel2life.com's tutorial feed
$rss = fetch_rss( $url );
$num_items = 10; # Pick a number of items from the feed you want to display
$items = array_slice($rss->items, 0, $num_items);

foreach ($items as $item) {
$ahref = $item['link'];
$title = $item['title'];
$description = $item['description']; # This doesnt work on p2l but other feeds have description so i didn't remove it if you want it ;)
print "<b><a href=$ahref>$title</a></b><br />$description<br /><br />";

}

?>

</div>


Live example here: http://rssarticles.itstyle.net/magpietutorialtest.php

 

Resources: http://magpierss.sourceforge.net/ www.php.net www.pixel2life.com




JOIN our mailing list TODAY here to get the latest NEWS and BEST offers:

Warning: main(http://rssarticles.itstyle.net/maillist/register.php) [function.main]: failed to open stream: HTTP request failed! HTTP/1.1 500 Internal Server Error in /usr/home/web/wno19625/rssarticles/index.php on line 160

Warning: main() [function.include]: Failed opening 'http://rssarticles.itstyle.net/maillist/register.php' for inclusion (include_path='/home/web/wno19625/rssarticles/comment/configuration:/home/web/wno19625/rssarticles/comment/include:/home/web/wno19625/rssarticles/comment/include/library:./:.:/usr/local/share/pear:') in /usr/home/web/wno19625/rssarticles/index.php on line 160



Comment Script
Post this page to: del.icio.us Yahoo! MyWeb Digg reddit Furl Blinklist Spurl

Comments

Comment display has been turned off.
#1 - Administrator - 09/04/2010 - 05:46
Powered by Comment Script

The 7-Point Email Marketing Checklist
Getting ready to kick-off an email marketing campaign? Alyssa shares the top 7 items on her email marketing checklist. Related Posts
  1. 5 Crucial Email Marketing Tips
  2. Get It Read: 7 Tips for Writing Better Email Subject Lines
  3. How to Build an Email Marketing List
Related posts brought to you by Yet Another Related Posts Plugin.




Avoid Email Overload With GMail’s Priority Inbox
Google is rolling out "Priority Inbox" to all GMail users. Craig explains how it works and how it could save you from email overload. Related Posts
  1. How I Fought Back Against Email Overload
  2. Have You Reached Email Account Overload?
  3. New GMail System Helps Prevent Email Embarrassment
Related posts brought to you by Yet Another Related Posts Plugin.




SitePoint Podcast #77: Paper or Blu-ray?
Tons to talk about in this week’s SitePoint Podcast: September 15th appears to be a nexus for the Web development world; Microsoft Russia lets slip an early peek at Internet Explorer 9’s user interface; Facebook puts another nail in the IE6 coffin; Google dramatically bows out of JavaOne over Oracle’s Android lawsuit; and H.264 threatens to turn the Web from paper into Blu-ray. Listen in for all this—and our host spotlights! Related Posts
  1. SitePoint Podcast #55: State-sponsored Brown Paper
  2. SitePoint Podcast #59: Speaking of Fail
  3. SitePoint Podcast #70: Youth, Business, and Podcasting with Dave Moyer and Jeff Chandler
Related posts brought to you by Yet Another Related Posts Plugin.




Dollar ReDe$ign Project
Jennifer takes a look at a few of the many submissions to the Dollar Redesign project. Related Posts
  1. Should You Work on a Project You Don’t Believe In?
  2. The Good-Quick-Cheap Project Rule
  3. 10 Reasons Why Software Project Estimates Fail
Related posts brought to you by Yet Another Related Posts Plugin.




Five Signs that You’re Ready to Freelance Full-time
Are you ready to start freelancing full-time? There's no magic formula for freelancing readiness, but as Georgina explains, there are some clear signs that suggest you're ready to go it alone. Related Posts
  1. Three Strategies for Managing Social Networks and a Full-Time Job
  2. How to Manage Postpurchase Dissonance in Your Freelance Clients
  3. 99designs Launches Ready-made Logo Store
Related posts brought to you by Yet Another Related Posts Plugin.




iPhone Basics: Memory Management
Do you want to get started on iPhone development? One of the first things you will stumble upon is memory management. But don't worry, Andrew explains why it is necessary and how to allocate and release objects correctly. Related Posts
  1. A List of Realistic Email Management Strategies That Just May Work
  2. Announcing a New Series on Business Start-up Basics
  3. How to Identify an Apple iPhone, iPod or iPad Visitor to Your Website
Related posts brought to you by Yet Another Related Posts Plugin.




Are You Strategic?
Thinking strategically can make you more confident, improve your leadership skills, help you problem-solve, and give you the tools you need to make better decisions. Alyssa guides you through analyzing your strategic thinking ability. Related Posts
  1. How to Harness Your Creativity for More Effective Problem Solving
  2. How to Use a SWOT Analysis to Blast Your Business Out of Complacency
  3. Check the Rear-View Mirror Before Proceeding into 2010
Related posts brought to you by Yet Another Related Posts Plugin.




H.264 Is Royalty-Free: Will it Become the HTML5 Video Standard?
MPEG LA has announced that web streaming of H.264 video files will remain free forever. Could it become the single most reliable format for HTML5? Related Posts
  1. Google Announces New WebM Video Standard, Open-Sources VP8
  2. The Dark Side of HTML 5 Video
  3. Web Directions Reflections, part 3: HTML5 with Bruce Lawson and Remy Sharp
Related posts brought to you by Yet Another Related Posts Plugin.




7 Ways to Keep It Together With Work When You’re Sick
What happens when you're sick and you can't take a sick day because you work for yourself? Alyssa has a few suggestions for limping through successfully until you resurface healthy again. Related Posts
  1. Boundaries vs. Barriers: 3 Ways to Set Limits without Losing Work
  2. Get Back to Work: It’s Time to Shake Off the Holidays
  3. 5 Ways to Maintain Client Relationships Long After the Work is Complete
Related posts brought to you by Yet Another Related Posts Plugin.




Save The United Airlines Iconic Tulip
A group of people who love the United Airlines tulip logo have created a Facebook page to voice their concerns over the change to Continental Airline's globe logo. Related Posts
  1. A Flag For The United States Of Europe
  2. Happy 50th Birthday Psycho
  3. Sign-Up to Save MySQL?
Related posts brought to you by Yet Another Related Posts Plugin.








Warning: Unknown(): open(/home/web/wno19625/.tmp/sess_bd363cc37fd770abea92b73209bfe80d, O_RDWR) failed: Permission denied (13) in Unknown on line 0

Warning: Unknown(): Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/home/web/wno19625/.tmp) in Unknown on line 0