Hello DaniWeb,

I am trying to retrieve the ip of the current proxy in use but it either throws an error saying "Unable to connect to the remote server" or it goes really, really slow and crashes the program for at least 10seconds. I have tried using multiple proxies from http://www.hidemyass.com/proxy-list/ but none of them work properly. Any help? Here is my code:

        Dim curProxy As String = "91.202.164.29:8080"

        Dim req As HttpWebRequest = DirectCast(HttpWebRequest.Create("http://www.ipchicken.com"), HttpWebRequest)
        req.Proxy = New WebProxy(curProxy)
        Dim res As HttpWebResponse = req.GetResponse
        Dim srcS As New StreamReader(res.GetResponseStream())
        Dim src As String = srcS.ReadToEnd()
        'WebBrowser1.DocumentText = src
        Dim ip() As String = GetBetweenAll(src, "<b>", "<br>")
        'MsgBox("Total ipS: " & ip.Count())
        'MsgBox(ip(0))
        Label4.Text = "Using Proxy " & ip(0)

Recommended Answers

Not sure if this helps (doesn't seem anyone else may have any ideas) but here is a link from code project that may help.

Jump to Post

All 2 Replies

Not sure if this helps (doesn't seem anyone else may have any ideas) but here is a link from code project that may help.

Can't see anything of help on that page but thanks for trying

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.