翻遍了论坛,都试过了
读取验证码和cookie代码:
[C#] 纯文本查看 复制代码 Dim codePic() As Byte
Dim http As New HttpHelper
Dim hr As New HttpResult
Dim item As New HttpItem
item.URL = "http://124.128.8.246:85/FrameSet/ValidateImage.aspx?s=0.9015829173337371"
item.ResultType = ResultType.Byte
hr = http.GetHtml(item)
cookies = hr.Cookie
codePic = hr.ResultByte
Dim ms As New IO.MemoryStream
ms = New IO.MemoryStream(codePic)
pb1.Image = Bitmap.FromStream(ms)
这里可以获取到验证码
登录代码
[C#] 纯文本查看 复制代码 Dim item As New HttpItem
Dim http As New HttpHelper
item.URL = "http://124.128.8.246:85/FrameSet/Login.aspx"
item.Method = "POST"
item.Postdata = CreateUData(strData)
item.Cookie = cookies
item.ContentType = "application/x-www-form-urlencoded"
item.Referer = "http://124.128.8.246:85/FrameSet/Login.aspx"
hr = http.GetHtml(item)
但是登录不争取,返回
<html><head><title>Object moved</title></head><body>
<h2>Object moved to <a href="%2ferror.htm">here</a>.</h2>
</body></html>
求助各位了,谢谢
|