Building a Generic RSS Class With PHP - Testing Our Class (Page 5 of 6 )
Testing our class is easy. It should be separated into its own file, class.myRSS.php. You should use PHP to include this file and output the value from the GetRSS function. Once you’ve done this, any other Webmaster can grab and parse your RSS XML feed to display your headlines on their site, and you can also submit the link to your RSS file to RSS listings to drive an insane amount of traffic back to your site.
Here's a quick example. Save it as rss.php in your root directory on your web server, along with class.myRSS.php and modify it as you need to:
// Instantiate the myRSS class $myRSS = new myRSS;
$myRSS->channelTitle = "My sample channel"; $myRSS->channelLink = "http://www.mysite.com"; $myRSS->channelDesc = "My sample RSS XML channel";