I have a form that takes user input rss feeds and puts them into listbox1. Then I have a listbox2 that contains rss services that I want to ping the urls from listbox1 and loop through listbox2 until completed.

Here is the code that I currently have on the ping button:

vb Code:
  1. Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
  2.         Dim listToPing As New ArrayList
  3.         Dim pingURL As String = ""
  4.         Dim blogURL As String = ""
  5.         Dim blogName As String = ""
  6.  
  7.         With listToPing
  8.             .Add("http://rpc.technorati.com/rpc/ping")
  9.             .Add("http://api.feedster.com/ping")
  10.             .Add("http://ping.feedburner.com")
  11.             .Add("http://blog.goo.ne.jp/XMLRPC")
  12.             .Add("http://ping.blo.gs/")
  13.             .Add("http://ping.bloggers.jp/rpc/")
  14.             .Add("http://ping.blogmura.jp/rpc/")
  15.             .Add("http://ping.cocolog-nifty.com/xmlrpc")
  16.             .Add("http://ping.syndic8.com/xmlrpc.php")
  17.             .Add("http://rpc.blogbuzzmachine.com/RPC2")
  18.             .Add("http://rpc.blogrolling.com/pinger/")
  19.  
  20.         End With
  21.  
  22.         For i As Integer = 0 To listToPing.Count - 1
  23.             Try
  24.                 pingURL = listToPing.Item(i).ToString
  25.                 Dim technoratiPing As Net.HttpWebRequest = CType(Net.WebRequest.Create(pingURL), Net.HttpWebRequest)
  26.                 technoratiPing.Method = "POST"
  27.                 technoratiPing.ContentType = "text/xml"
  28.                 Dim streamPingRequest As IO.Stream = CType(technoratiPing.GetRequestStream, IO.Stream)
  29.                 Dim xmlPing As Xml.XmlWriter = New Xml.XmlTextWriter(streamPingRequest, System.Text.Encoding.UTF8)
  30.                 xmlPing.WriteStartDocument()
  31.                 xmlPing.WriteStartElement("methodCall")
  32.                 xmlPing.WriteElementString("methodName", "weblogUpdates.ping")
  33.                 xmlPing.WriteStartElement("params")
  34.                 xmlPing.WriteStartElement("param")
  35.                 xmlPing.WriteElementString("value", blogName)
  36.                 xmlPing.WriteEndElement()
  37.                 xmlPing.WriteStartElement("param")
  38.                 xmlPing.WriteElementString("value", blogURL)
  39.                 xmlPing.WriteEndElement()
  40.                 xmlPing.WriteEndElement()
  41.                 xmlPing.WriteEndElement()
  42.                 xmlPing.Close()
  43.                 Dim technoratiPingResponse As Net.HttpWebResponse = CType(technoratiPing.GetResponse, Net.HttpWebResponse)
  44.                 Dim streamPingResponse As IO.StreamReader = New IO.StreamReader(technoratiPingResponse.GetResponseStream)
  45.                 Dim strResult As String = streamPingResponse.ReadToEnd
  46.                 streamPingResponse.Close()
  47.                 technoratiPingResponse.Close()
  48.             Catch ex As Exception
  49.                 'Add code here to flag a service as broken
  50.             End Try
  51.         Next
  52.     End Sub

How do I get it to loop through each rss feed from listbox1 and post them to the rss services from listbox2?

Chris