Using Proxy With WebClient In VB.NET
Here is a snippet to use WebProxy. This is useful for scraping or other webrequest activities.
Dim webclient As New System.Net.WebClient Try 'true for bypassOnLocal webclient .Proxy = New System.Net.WebProxy("180.95.129.232:80",true) wc.OpenRead("http://yoursite.com") lblStatus.Text = "ok" Catch lblStatus.Text = "error proxy" End Try
when I'm using a list of proxy
ReplyDeletexxx.xxx.xxx.xxx:xxxx
xxx.xxx.xxx.xxx:xxxx
xxx.xxx.xxx.xxx:xxxx
xxx.xxx.xxx.xxx:xxxx
...
...
- only first proxy returns "ok"
other items in this list are not working.