Does anyone have code that would use inet to open a txt file, read its list of proxies, and connect to the internet using a random line of the txt file?
Printable View
Does anyone have code that would use inet to open a txt file, read its list of proxies, and connect to the internet using a random line of the txt file?
What the above does is split the text file (a proxy on each line) into a list box, selects a proxy from the listbox and aplies it to the Inet control.Code:Dim words() As String
Dim i As Integer
FileNum = FreeFile
'Open text file to text2.text
Open "C:\proxylist.txt" For Input As #FileNum
Do Until EOF(1)
Line Input #FileNum, Data
Loop
Close #FileNum
'Split data into list box
words = Split(data, vbCrLf)
For i = 0 To UBound(words)
lstProxy.AddItem words(i)
Next
Private Sub Command1_Click()
lstProxy.ListIndex = lstProxy.ListIndex + 1
Inet1.Proxy = lstProxy.Text
'do the rest of your inet operations.
End Sub
What you could also do is place each line of the text file into an array, select randon points and aply them to the inet control. (I'm sorry but i do not have the code for that, but i think someone posted it earlier.
Gl,
D!m