forum

Home / DeveloperSection / Forums / How to get proxy from text file c#/.net?

How to get proxy from text file c#/.net?

Takeshi Okada 2197 03-Feb-2014

I have saved some url's in a text(link.txt) file & some proxy(proxy.txt) in another text file.

now i want to use different proxy for each url.

like:

www.google.com 202.56.232.117:8080

www.facebook.com 506.78.781.987:9001

www.twitter.com 749.961.73.459:8008

this is my code but i don't know how to use different proxy(proxy.txt) for each url.

please tell me how to make this work.

try
{
    foreach (string sr in File.ReadAllLines("link.txt"))
    {
        webBrowser1.Navigate(sr);
    }
    webBrowser1.ScriptErrorsSuppressed = true;
    while (webBrowser1.ReadyState != WebBrowserReadyState.Complete)
    {
        Application.DoEvents();
    }
}
catch(Exception)
{
     MessageBox.Show("Internet Connection not found","Error",MessageBoxButtons.OK,MessageBoxIcon.Error);
     this.Close();
}

c# c# 
Updated on 03-Feb-2014

Can you answer this question?


Answer

1 Answers

Liked By