I Want To Make A Proxy Grabber In VB.NET For The http://nntime.com/ Page Can Anyone Help?
Imports System.Text.RegularExpressions
Public Class Form1
Private Sub Button4_Click(sender As Object, e As EventArgs) Handles Button4.Click
Me.Close()
End Sub
Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
ListBox1.Items.Clear()
End Sub
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
Dim sw As IO.StreamWriter
Dim itms() As String = {ListBox1.Items.ToString}
Dim save As New SaveFileDialog
Dim it As Integer
save.FileName = "Grabbed Proxies"
save.Filter = "Grabbed Proxies (*.txt)|*.txt|ALL Files (*.*)|*.*"
save.CheckPathExists = True
save.ShowDialog(Me)
sw = New IO.StreamWriter(save.FileName)
For it = 0 To ListBox1.Items.Count - 1
sw.WriteLine(ListBox1.Items.Item(it))
Next
sw.Close()
End Sub
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim the_request As System.Net.HttpWebRequest = System.Net.HttpWebRequest.Create("http://proxy-ip-list.com")
'creating the httpwebresponce
Dim the_response As System.Net.HttpWebResponse = the_request.GetResponse
'defining the stream reader to read the data from the httpwebresponse
Dim stream_reader As System.IO.StreamReader = New System.IO.StreamReader(the_response.GetResponseStream())
'defining a string to stream reader fisnished streaming
Dim code As String = stream_reader.ReadToEnd
'haha here we use the regex
Dim expression As New System.Text.RegularExpressions.Regex("[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}:[0-9]{1,4}")
'adding the proxies to the listbox
Dim mtac As MatchCollection = expression.Matches(code)
For Each itemcode As Match In mtac
ListBox1.Items.Add(itemcode)
Next
End Sub
But Was Not Working On The http://nntime.com/ Page
Thanks In Advance :)