This C# sample source code shows how to use the Tortuga
RSS Component to
download / read an RSS news feed using an HTTP Proxy.
// Download an RSS Feed via an HTTP Proxy
Tortuga.Rss rss = new Tortuga.Rss();
// Download Google Headline RSS News Feed using HTTP Proxy
// The Proxy Server can be an IP Address or hostname. This example uses an IP address with port 3124.
bool success = rss.DownloadRssByProxy("http://news.google.com/news?ned=us&topic=h&output=rss",
"130.208.18.30",3124);
if (!success)
{
return;
}
// Get the channel.
Tortuga.Rss channel = rss.GetChannel(0);
// How many RSS news items?
int numItems = channel.NumItems;
// Add the title of each item to a list box.
int i;
for (i=0; i<numItems; i++)
{
Tortuga.Rss item = channel.GetItem(i);
listBox1.Items.Add(item.GetString("title"));
}
Note: The DownloadRssByProxy method will not be available until the RSS component download is updated on 1-Oct-2005