Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Proxy authentication

Status
Not open for further replies.

whistller

Programmer
Oct 7, 2011
4
0
0
LT
Hi,

I have created web browser that surf to the internet through proxy and now I need to create a browser that surf to internet via proxy authentication server (server required enter username and password) and I dont know what command to write..
Maybe something has a small example ?

Pls, help
 
Finally I got something, what is wrong ?
Code:
Private Sub Command6_Click()
Dim header As String
Inet1.UserName = username
Inet1.Password = password
Inet1.Proxy = "192.168.120.120:17890"
Inet1.AccessType = icNamedProxy

header = "Proxy-Authorization: Basic " & Inet1.UserName & ":" & Inet1.Password

Inet1.Execute , "GET", , header, Combo1
Inet1.Execute "192.168.120.120:17890", "GET", header
Text1.Text = Inet1.OpenURL("[URL unfurl="true"]http://www.google.com")[/URL]
WebBrowser1.Navigate Inet1.OpenURL("[URL unfurl="true"]http://www.microsoft.com")[/URL]

End Sub
 
I can`t get this to work:
Code:
Private Sub Command6_Click()
Dim header As String, Response As String
Dim temp() As String
Inet1.protocol = icHTTP
Inet1.Proxy = "87.237.126.50:2448"
Inet1.UserName = "userr"
Inet1.Password = "pass"
Inet1.URL = "[URL unfurl="true"]http://whatismyipaddress.com/"[/URL]
header = "Proxy-Authorization: Basic " & Inet1.UserName & ":" & Inet1.Password
Me.Caption = "Authenticating " & Inet1.URL & "...."
Inet1.Execute , "GET", , header
If Inet1.StillExecuting = False Then Exit Sub
Do
DoEvents
Loop Until Inet1.StillExecuting = False
Response = Inet1.GetHeader
temp = Split(Response, vbNewLine)
Me.Caption = "PROXY AUTHENTICATION USING INET CONTROL"
MsgBox temp(0)
Text1.Text = Inet1.OpenURL("[URL unfurl="true"]http://whatismyipaddress.com/")[/URL]


End Sub

I enter to website, however IP adress wont change. when authorizing with proxy server it said:
Code:
http:// 1.1 ok
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top