Search Engine Optimisation SEO - New Zealand, Search Engine Optimisation SEO Australia

The SEO Guy - NZ SEO / Australia SEO

  Home | The SEO Guy's BLOG

 | Skype Fone: The Seo Guy

 

RSS to HTML via CaRP

Download link for CaRP ::

CaRP : RSS to HTML Conversion  
CaRP: an RSS to HTML converter with free and commercial versions, written in PHP. Easily intergrate RSS news feeds into your website, regardless of whether its PHP, HTML, SHTML or ASP.
 

More RSS Tools :: Tools, information and resources

CaRP Config Page: Here, we've set some general parameters for all RSS Feeds,

// Add configuration code that applies to all themes here
CarpConf('cache-method','mysql');
CarpConf('mysql-connect',1);
CarpConf('mysql-database','databasename');
CarpConf('mysql-username','username');
CarpConf('mysql-password','');
CarpConf('linktarget','1');               :: This sets each item to load in a new window
CarpConf('maxitems',5);                :: This sets maximum number of items displayed per feed to 5
CarpConf('bcb','<font size="3">');    :: This sets large font size on Channel items 
CarpConf('acb','</font>');              :: This sets turns font size off for Channel items 
CarpConf('bca','<font size="1">');    :: This sets small font size on items after Channels
CarpConf('aca','</font>');              :: This resets font size to default  
CarpConf('bitems','<ul>');               :: The following set "list" format for items
CarpConf('aitems','</ul>');             
CarpConf('bi','<li>');                      
CarpConf('ai','</li>');                    
 

HTML PAGE - Inserting the Feed

We've installed our 3 RSS feeds into a table, the PHP code is shown in red, feed link in blue;

<table border="0" width="100%" id="table8" bgcolor="#FFFFFF" cellpadding="5" cellspacing="5">
<tr>
<td bgcolor="#CCCCCC">

<?php
require_once '/home/comauth/public_html/carp/carp.php';
// Add any desired configuration settings before CarpCacheShow
// using "CarpConf" and other functions
CarpConf('poweredby','');
CarpCacheShow('
http://www.sitepronews.com/index.rss');
?>
</td>
</tr>
<tr>
<td bgcolor="#CCCCCC">
<?php
require_once '/home/comauth/public_html/carp/carp.php';
// Add any desired configuration settings before CarpCacheShow
// using "CarpConf" and other functions
CarpConf('poweredby','');
CarpCacheShow('
http://www.comauth.co.nz/the-seo-guys-blog/rss');
?>

</td>
</tr>
<tr>
<td bgcolor="#CCCCCC">
<?php
require_once '/home/comauth/public_html/carp/carp.php';
// Add any desired configuration settings before CarpCacheShow
// using "CarpConf" and other functions
CarpConf('poweredby','');
CarpCacheShow('
http://www.comauth.co.nz/directory/rssfeed.php');
?>

</td>
</tr>
</table>
 

Activating Code Execution in HTML Pages

At the bottom of the .htaccess file, in the root directory, we've added this little section which allows PHP code to be executed within an HTML document, in this case the index.htm file only. You could also, as per the CaRP documentation, allow this across the entire site if required.

 

<Files index.htm>
AddType application/x-httpd-php .htm
</Files>

 

 

To learn how we can help your business grow, click HERE for a Free Site Assessment!

 
 

Search Engine Optimisation Services