Will Perone

Creating an RSS (Really Simple Syndication) feed for a custom blog is so easy you'll be kicking yourself for not doing it earlier. All you need is about 1 page of PHP code to do it. I'll be using the RSS for my own website as an example. Lets first start out with some HTML.
<LINK rel="alternate" type="application/rss+xml" title="RSS Feed for willperone.net" href="rss.php" />
This code goes between your <head> and </head> What this does is create an RSS link in the URL bar so that people can subscribe to your RSS from there. Easy enough; now lets get to the meat of it. The following should be it's own file named RSS.php (as referenced above).
header("Content-Type: application/xml; charset=ISO-8859-1");

echo '<?xml version="1.0" encoding="ISO-8859-1" ?>
       <rss version="2.0" 
	   <title>Perone\'s Programming Pad</title>
	   <description>Perone\'s Programming Pad</description>
	   <atom:link href="http://willperone.net/rss.php" rel="self" type="application/rss+xml" />
			<title>Perone\'s Programming Pad</title>

@mysql_connect ('your sql server', ' your login', 'your password') OR die ('Could not connect to MySQL: ' . mysql_error());
mysql_select_db ('your blog db') OR die ('Could not select the database: ' . mysql_error());
$result = mysql_query("SELECT * FROM blog ORDER BY id DESC");
while($row = mysql_fetch_array($result))
	echo '<item>
		<title>'. $row["title"] .'</title>
		<dc:creator>Will Perone</dc:creator>
		<pubDate>'. $row["date"] .'</pubDate>
		<description><![CDATA['. $row["text"] .']]></description>
echo '</channel></rss>';
Easier than you thought right? You can also include a link to your RSS in your website using the RSS standard icon like I have on the left. For more info on RSS, visit The RSS Specifications page. You may also want to validate your feed before publishing it at the Feed Validator site.

Cuong 2012/09/10 Contact Me0 0
2011/10/09 13:05 1BCome on, my friend! Try it ,I like .net from PHP. you know that,PHP is so easy for can't study comtuper language'human. And, yes you can do it, you can move all you wordpress posts into other blog,couse I fand an posts can help you, but is Chinese. ()
Gopal 2014/06/02 Contact Me0 0

<- for private contact