Adblock breaks this site

[HELP] Proxy with HttpWebRequests?

Discussion in 'Programming General' started by dgameman1, May 25, 2011.

  1. dgameman1

    dgameman1 Active Member
    Banned

    Joined:
    May 25, 2006
    Posts:
    122
    Referrals:
    0
    Sythe Gold:
    0
    [HELP] Proxy with HttpWebRequests?

    So my current code is

    Code:
      Try
        Dim WR As Net.HttpWebRequest = Net.HttpWebRequest.Create(TextBox1.Text)
        Dim Response As Net.HttpWebResponse = WR.GetResponse()
        Dim SR As New IO.StreamReader(Response.GetResponseStream)
        Dim PageData As String = SR.ReadToEnd()
        SR.Close()
      Catch ex As Exception
        Dim WR As Net.HttpWebRequest = Net.HttpWebRequest.Create("http://" & TextBox1.Text)
        Dim Response As Net.HttpWebResponse = WR.GetResponse()
        Dim SR As New IO.StreamReader(Response.GetResponseStream)
        Dim PageData As String = SR.ReadToEnd()
        SR.Close()
      End Try
    How can I use proxies with a webrequest?

    I know how to do it with webpages. I use the RefreshIEsettings, but how do i do it with webrequests?
     
  2. Blondi

    Blondi Guru
    Banned

    Joined:
    Jan 21, 2007
    Posts:
    1,458
    Referrals:
    0
    Sythe Gold:
    0
    [HELP] Proxy with HttpWebRequests?

< Structs are just abstractions (proof) | Need help with encryption >


 
 
Adblock breaks this site