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
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.
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 />";
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
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
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
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
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
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
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
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
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
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