Hey Guys,
I can never seem to remember how to do this lol what i'm doing is looping a listview with 2 columns, the first column contains urls and the second is blank ready to be updated with either "YES" or "NO"
code:
I'm not sure the code to update the subitem in every url.SubItems(0).Text row like:
site1.com YES
site2.com NO
etc
I cannot remmeber how to do this!
cheers for any help guys!
Graham
I can never seem to remember how to do this lol what i'm doing is looping a listview with 2 columns, the first column contains urls and the second is blank ready to be updated with either "YES" or "NO"
code:
Code:
For Each url As ListViewItem In listViewMain.CheckedItems
'// SEND REQUEST
Dim request As WebRequest = WebRequest.Create("http://site.com/&domain=" & url.SubItems(0).Text)
'// GET THE RESPONSE
Dim response As WebResponse = request.GetResponse()
'// THE DATASTREAM RETURNED BY THE REQUEST
Dim dataStream As Stream = response.GetResponseStream()
'// OPEN THE RESPONSE IN A STREAMREADER
Dim reader As New StreamReader(dataStream)
'// READ THE CONTENT TO THE END
Dim responseFromServer As String = reader.ReadToEnd()
'// IF STRING CONTAINS...
If (responseFromServer.Contains(":false")) Then
'// FALSE
Else
'// TRUE
End If
'formDebug.Show()
'formDebug.txtBoxDebug.Text = responseFromServer
Next
site1.com YES
site2.com NO
etc
I cannot remmeber how to do this!
cheers for any help guys!
Graham