用xmlhttp登录7k7k并用动态WebBrowser验证登录结果
用xmlhttp登录7k7k,并用动态WebBrowser验证登录结果,直接上代码:Dim web1 As Object
Private Sub Form_Load()
Set web1 = Me.Controls.Add("SHELL.EXPLORER.2", "web1", Me)
web1.Visible = True
web1.Move 0, 0, 1020, 744
web1.object.Silent = True
Set xmlhttp = CreateObject("Microsoft.XMLHTTP")
xmlhttp.open "POST", "http://zc., False
xmlhttp.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
xmlhttp.setRequestHeader "Connection", "Keep-Alive"
xmlhttp.send ("username=tst7k01&password=tst7k01")
web1.object.Navigate "http://www., 0
Set xmlhttp = Nothing
End Sub
源码文件:
xmlhttp_login_7k7k.rar
(1.43 KB)