T
Te-Deum
Hi,
I use this function to download the source of an internet web page,
but if i have a proxy, it doesn't work.
Do you know how i can add a proxy authentification ?
Public Function GetSource(ByVal sURL As String) As String
Try
Dim request As HttpWebRequest = _
CType(WebRequest.Create(sURL), _
HttpWebRequest)
request.AllowAutoRedirect = True
Dim response As HttpWebResponse = _
CType(request.GetResponse(), _
HttpWebResponse)
Dim sr As StreamReader = _
New StreamReader(_
response.GetResponseStream(), _
Encoding.ASCII)
GetSource = sr.ReadToEnd()
Catch
End Try
End Function
Thanks for your help.
Te-Deum
I use this function to download the source of an internet web page,
but if i have a proxy, it doesn't work.
Do you know how i can add a proxy authentification ?
Public Function GetSource(ByVal sURL As String) As String
Try
Dim request As HttpWebRequest = _
CType(WebRequest.Create(sURL), _
HttpWebRequest)
request.AllowAutoRedirect = True
Dim response As HttpWebResponse = _
CType(request.GetResponse(), _
HttpWebResponse)
Dim sr As StreamReader = _
New StreamReader(_
response.GetResponseStream(), _
Encoding.ASCII)
GetSource = sr.ReadToEnd()
Catch
End Try
End Function
Thanks for your help.
Te-Deum