-
-
求助 VB发带有Cookie的post包
-
发表于:
2014-10-2 20:22
5918
-
[/CODE]Private Sub Command1_Click()
Dim Myurl As String, send_data As String, my_head As String '//变量
Myurl = "http://eventie.wanmei.com/w2i/reserverobtain/gameLogin!obtain.action" '//提交的页面
send_data = "bean.server=163&bean.servername=%E4%BC%A0%E6%89%BF%E5%8F%8C%E7%BA%BF-%E5%A4%A9%E8%A1%8C&bean.rolename=%E6%B2%A1%E9%81%93%E7%90%86%E7%9A%84%E7%A9%BA%E9%97%B4" '//提交的值
my_head = "Content-Type: application/x-www-form-urlencoded"
Inet1.Execute Myurl, "POST", send_data, my_head '// POST 或者GET
End Sub[CODE]
下面这句是Cookie 如何发送。
[/CODE]JSESSIONID=tomcat3~D24B469309539EC0694464E2D37B727E-m1[CODE]
再看E语言已经成功的写法。
.版本 2
.支持库 spec
[/CODE]A = 编码_Utf8到Ansi (网页_访问 (“http://eventie.wanmei.com/w2i/reserverobtain/gameLogin!obtain.action”, 1, “bean.server=175&bean.servername=%E4%BC%A0%E6%89%BF%E5%8F%8C%E7%BA%BF-%E6%9C%88%E4%BB%99&bean.rolename=%E6%B2%A1%E9%81%93%E7%90%86%E7%9A%84%E7%A9%BA%E9%97%B4”, “JSESSIONID=tomcat3~D24B469309539EC0694464E2D37B727E-m1”, , , , , , ))
[CODE]
调试输出 (A)
[注意]传递专业知识、拓宽行业人脉——看雪讲师团队等你加入!