首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > VB >

vb 怎么自动登陆淘宝 webbrowser可以用xmlhttp 都可以

2012-07-18 
vb 如何自动登陆淘宝 webbrowser可以用xmlhttp 都可以vb 如何自动登陆淘宝 webbrowser可以用xmlhttp 都可

vb 如何自动登陆淘宝 webbrowser可以用xmlhttp 都可以
vb 如何自动登陆淘宝 webbrowser可以用xmlhttp 都可以 inet都可 感觉应该很简单 可是就是实现不了。希望大家给帮助。

[解决办法]
Option Explicit

Private Sub Command1_Click()
Dim strURL As String, strPostData As String, strHEAD As String
Dim ReturnCode As String, strData As String, ReturnTemp As String
Dim Inet1 As Object
Set Inet1 = CreateObject("InetCtls.Inet")
strURL = "http://login.taobao.com/member/login.jhtml"
strPostData = "TPL_username=" & UsrName.Text & "&TPL_password=" & UsrPass.Text & _
"&actionForStable=enable_post_user_action&action=Authenticator&mi_uid=" & _
"&mcheck=&TPL_redirect_url=http%3A%2F%2Fi.taobao.com%2Fmy_taobao.htm" & _
"%3Fnekot%3DdmJsb2Fk1272686739178&_oooo_=http%3A%2F%2Fi.taobao.com%2Fmy_taobao." & _
"htm%3Fnekot%3DdmJsb2Fk1272686739178&event_submit_do_login=anything&abtest=&pstrong=2" & _
"&from=&yparam=&done=&loginType=3&tid=&support=000001&CtrlVersion=1%2C0%2C0%2C7&loginFromCount=tbBeta"
strHEAD = "Content-Type:application/x-www-form-urlencoded"
Inet1.Execute strURL, "Post", strPostData, strHEAD
Do Until Inet1.StillExecuting = False
DoEvents
Loop
ReturnCode = ""
Do
ReturnCode = ReturnCode + ReturnTemp
ReturnTemp = Inet1.GetChunk(1024, 0)
Loop Until ReturnTemp = ""
If InStr(ReturnCode, "小二已经在此恭候多时了") = 0 Then
UsrName.Text = "登录失败"
Else
UsrName.Text = "登录成功"
End If
End Sub

Private Sub Form_Load()
UsrName.Text = ""
UsrPass.Text = ""
End Sub

热点排行