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 Generated 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 - 03/12/2010 - 06:11
Powered by Comment Script

SitePoint Podcast #52: Building Communities with Derek Powazek, Part 1
Derek Powazek, co-creator of JPG Magazine and creator of Fray, drops by to discuss the care and feeding of web communities. We touch on the place of forums in a Web 2.0 world, creating communities around commercial products, the potential value of closed communities, and balancing user demands against your own plans. Related posts:
  1. SitePoint Podcast #48: Publishing Futures with Derek Powazek Derek Powazek, co-creator of JPG Magazine and creator of Fray,...
  2. Managing Online Communities With Patrick O’Keefe SitePoint Co-founder Matt Mickiewicz caught up with Patrick O’Keefe, owner...
  3. SitePoint Podcast #31: SitePoint Cofounders Mark & Matt A real glimpse behind the scenes, this week! Kevin Yank...





Stickybits App – Tag Real Objects With Digital Files
Jennifer takes a look at a new app and web site which lets you stick digital files on real objects. Related posts:
  1. Adobe Shortcut App The Adobe Shortcut App for Creative Suite is a handy,...
  2. How to Organize Your Files…and Remember Where Everything Is, Part 1 We all access, add to and dig through the files...
  3. SitePoint Podcast #51: Real Web Designers Get It New browser updates; whether web designers should be code-savvy; and...





How to Get Control of Your Business Finances
As a business owner, having a solid process for creating, tracking and analyzing your budget is extremely important. Alyssa gives you some areas to consider. Related posts:
  1. Four Steps to Developing a Business Budget A budget can be an effective tool to help you...
  2. 10 Easy Ways to Save Money in Your Business How would you like to save on what it costs...
  3. You Want To Pay Me What? How Lowering Your Rates Can Hurt Your Business Do you change your rates based on what a new...





Do you want to learn every aspect of web design from scratch for free?
Well... we can teach you. Seriously. No strings attached. Related posts:
  1. Learn About Affiliate Marketing… For Free The Affiliate Convention in Denver, Colorado next month is offering...
  2. Look, Listen, Learn: 10 Podcasts For Designers Jennifer takes a look at and a listen to a...
  3. CSS Skills = Better Web Design? On the SitePoint Podcast #51 this week, we discussed what...





Color In Design: Black
In the penultimate post on the series, Color in Design, Jennifer looks at black. Related posts:
  1. Color In Design: Gray Jennifer takes a look at the use of gray in...
  2. Color In Design: Yellow Continuing the series of Color In Design, Jennifer looks at...
  3. Principles of Design: Color In the final part of her series on design principles,...





Windows 7 Sells 90 Million Copies
Microsoft are reporting high Windows 7 sales since the OS was launched in 2009. Craig examines how the figures compare to Vista and whether Windows 7 has really been the success Microsoft needed. Related posts:
  1. How to Enable Windows 7 GodMode "GodMode" is a great trick that allows you to access...
  2. Windows 7 Pre-Orders Sell Out on Day 1 Pre-orders for Microsoft Windows 7 have sold out on day...
  3. Windows 7: the First Month Review, Part 3 In the final of Craig's 3-part review, he looks at...





Express Yourself with Creative Prototypes
In today's tutorial, user experience expert Shane Morris takes Microsoft's Prototyping tool SketchFlow for a test drive. Related posts:
  1. All Aboard the SQL Server Express! In today’s tutorial, web application development specialist Akash Mehta explores...
  2. Your New PHP Editor: Expression Web 3 Thought visual editors were a thing of the past? Well...
  3. Six Ideas For Breaking A Creative Block Creative block hits many designers at some stage in their...





All Scripts used in jQuery: Novice to Ninja are now FREE to download
For the first time we’re offering the entire code archive for free. Not just the code used in the sample chapters, all code used in the entire book! Related posts:
  1. SitePoint Podcast #50: jQuery: Novice to Ninja Kevin Yank is joined by Earle Castledine (@mrspeaker) and Craig...
  2. It’s Easy to Fall in Love with jQuery A framework that condenses lines of clunky JavaScript into elegant,...
  3. Improve Your jQuery Knowledge with the Source Viewer The jQuery source viewer is a great tool which allows...





10 Notebook Applications for Managing Ideas
There are a lot of notebook applications out there; Alyssa compiled a list of 10 for you to explore. Related posts:
  1. How I Use Evernote to Manage My Ideas As a follow-up to a previous post, today Alyssa shares...
  2. How To Use Evernote To Create A Mood Board Jennifer has a look at how Evernote can help you...
  3. Swipe This! Use A Swipe File For Inspiration Swipe files are a great way to compile inspiring ideas....





How I Use Evernote to Manage My Ideas
As a follow-up to a previous post, today Alyssa shares her process for managing and organizing ideas. Related posts:
  1. 10 Notebook Applications for Managing Ideas There are a lot of notebook applications out there; Alyssa...
  2. How To Use Evernote To Create A Mood Board Jennifer has a look at how Evernote can help you...
  3. 21 BlackBerry Apps for Professionals Anything that gives you an opportunity to work without being...









Copyright © 2007 RSSArticles.itstyle.net . All rights reserved. Sitemap