VB用INET提交数据登入问题
登入个WAP网站,登入页面地址:http://lexun.com/login.asp?cd=0&lxt=网页源码为<?xmlversion="1.0"encoding="...
登入个WAP网站,登入页面地址:http://lexun.com/login.asp?cd=0&lxt=
网页源码为<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">
<wml><head><meta http-equiv="Cache-Control" content="max-age=0"/></head> <card id="main" title="乐讯-免费注册/登录" ><p><b>欢迎登录乐讯</b><br/>当前<b><u>263052</u></b>人在线<br/><a href="http://221.130.191.179/login/zz.aspx?fw=&cd=0">自动登陆注册</a><br/>ID或手机号码<br/><input name="tNum" type="text" format="*N" value="0"/><br/>密码<br/><input name="tPWD" type="text" value="0"/><br/>
<anchor title="登录">登录
<go href="http://221.130.191.179/login/login.aspx" method="post">
<postfield name="style" value="$(tstyle)" />
<postfield name="Num" value="$(tNum)" />
<postfield name="PWD" value="$(tPWD)" />
<postfield name="porders" value="1" />
<postfield name="cd" value="0" />
<postfield name="retUrl" value="" />
<postfield name="fw" value="" />
</go></anchor>
|<a href="/logingetpwd.asp?cd=0">忘记密码</a><br/><a href="http://clubh.lxyes.com/help/ad_page.aspx?rid=314&cd=0">3秒钟快速免费注册</a><br/>=注册.登录.取回密码=<br/>请发短信pw+您的密码(不超过10个英文或数字)发送到<a href="sms:10669160218019?body=pw">10669160218019</a>后使用手机号码和您刚设置的密码登陆<br/><b><u>看看大家在忙啥.其中提取出ID和密码输入框关键字或名字为name="tNum"和 name="tPWD"因为找不到登入按钮名和关键字,找到登入按钮的连接地址为http://221.130.191.179/login/auto.aspx
本人代码如下
Private Sub Command1_Click()
Dim myurl As String, send_data As String, my_head As String
myurl = "http://221.130.191.179/login/login.aspx"
send_data = "tNum=21492111 & tPWD=12345"
my_head = "Content-Type: application/x-www-form-urlencoded"
Inet1.Execute myurl, "POST", send_data, my_head
End Sub
Private Sub Inet1_StateChanged(ByVal State As Integer)
Dim get_data As String
' Do Until Inet1.StillExecuting = False
'
' Loop
If State = 12 Then
get_data = Inet1.GetChunk(1024)
Label1.Caption = get_data
End If
End Sub
因为字数限制,删减了部分网页源码,应该不会影响阅读,如有影响请说明本人在补充,不知道我的代码错在哪里,运行时返回的还是未登入的源码,请能人指点,说明错误在拿并帮我改写成功的代码,要详细的,谢谢了解决了有重谢~~~~ 展开
网页源码为<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">
<wml><head><meta http-equiv="Cache-Control" content="max-age=0"/></head> <card id="main" title="乐讯-免费注册/登录" ><p><b>欢迎登录乐讯</b><br/>当前<b><u>263052</u></b>人在线<br/><a href="http://221.130.191.179/login/zz.aspx?fw=&cd=0">自动登陆注册</a><br/>ID或手机号码<br/><input name="tNum" type="text" format="*N" value="0"/><br/>密码<br/><input name="tPWD" type="text" value="0"/><br/>
<anchor title="登录">登录
<go href="http://221.130.191.179/login/login.aspx" method="post">
<postfield name="style" value="$(tstyle)" />
<postfield name="Num" value="$(tNum)" />
<postfield name="PWD" value="$(tPWD)" />
<postfield name="porders" value="1" />
<postfield name="cd" value="0" />
<postfield name="retUrl" value="" />
<postfield name="fw" value="" />
</go></anchor>
|<a href="/logingetpwd.asp?cd=0">忘记密码</a><br/><a href="http://clubh.lxyes.com/help/ad_page.aspx?rid=314&cd=0">3秒钟快速免费注册</a><br/>=注册.登录.取回密码=<br/>请发短信pw+您的密码(不超过10个英文或数字)发送到<a href="sms:10669160218019?body=pw">10669160218019</a>后使用手机号码和您刚设置的密码登陆<br/><b><u>看看大家在忙啥.其中提取出ID和密码输入框关键字或名字为name="tNum"和 name="tPWD"因为找不到登入按钮名和关键字,找到登入按钮的连接地址为http://221.130.191.179/login/auto.aspx
本人代码如下
Private Sub Command1_Click()
Dim myurl As String, send_data As String, my_head As String
myurl = "http://221.130.191.179/login/login.aspx"
send_data = "tNum=21492111 & tPWD=12345"
my_head = "Content-Type: application/x-www-form-urlencoded"
Inet1.Execute myurl, "POST", send_data, my_head
End Sub
Private Sub Inet1_StateChanged(ByVal State As Integer)
Dim get_data As String
' Do Until Inet1.StillExecuting = False
'
' Loop
If State = 12 Then
get_data = Inet1.GetChunk(1024)
Label1.Caption = get_data
End If
End Sub
因为字数限制,删减了部分网页源码,应该不会影响阅读,如有影响请说明本人在补充,不知道我的代码错在哪里,运行时返回的还是未登入的源码,请能人指点,说明错误在拿并帮我改写成功的代码,要详细的,谢谢了解决了有重谢~~~~ 展开
1个回答
展开全部
"http://221.130.191.179/login/login.aspx?Num=123&PWD=abc&porders=1"
按照这个地址连接应该就没问题了
按照这个地址连接应该就没问题了
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询