Creating XML-RSS Feed Using PHP MYSQL

I have been working to create crowler friendly rss feed for our website. I think it is very easy to build . But when i started coding it i got so many problems with xml and special charcters. I tried program for replacing special characters. But it wont work. Finally i used utf8_encode. It worked


I have attached PHP Source code for XML Generator


Right click on the above link and save target as …

Below function is used to clean all extra characters in the content.

function clean_url($text)
$code_entities_match = array(‘>>’,’–’,’�’,’–’,’&’,’“’,’”’,’–’,’’’,’-‘,’–‘,'”‘,’!’,’@’,’#’,’$’,’%’,’^’,’&’,’*’,'(‘,’)’,’_’,’+’,'{‘,’}’,’|’,’:’,'”‘,'< ‘,’>’,’?’,'[‘,’]’,’\\’,’;’,”‘”,’,’,’.’,’/’,’*’,’+’,’~’,’`’,’=’,’-‘,’ï’,’–’,”‘”,’O’);

return str_replace($code_entities_match,”, $text);

To make an rss feed you need title, description and link

Sample RSS FEED format

<rss version=”0.91″>
    <description> features a rich mix of information and services for the XML community.</description>
            <title>Normalizing XML, Part 2</title>
             <description>In this second and final look at applying relational normalization techniques to W3C XML Schema data modeling, Will Provost discusses when not to normalize, the scope of uniqueness and the fourth and fifth normal forms.</description>

      <title>SVG’s Past and Promising Future</title>
           <description>In this month’s SVG column, Antoine Quint looks back at SVG’s journey through 2002 and looks forward to 2003.</description>

also go through the source code attached


me : yeay its me arun

Tagged with: , , , , , , , , ,

Leave a Reply

Your email address will not be published. Required fields are marked *


This site uses Akismet to reduce spam. Learn how your comment data is processed.