求助VB解压Gzip代码

longzhiziln longzhiziln 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
Private Sub Winsock1_Connect()
Dim StrCommand As String
StrCommand = StrCommand & "GET /s?bs=%B7%C7%B3%CF%CE%F0%C8%C5&f=8&wd=%B7%C7%B3%CF%CE%F0%

C8%C5 HTTP/1.1" & vbCrLf
StrCommand = StrCommand & "Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg,

application/x-shockwave-flash, application/msword, application/vnd.ms-excel,

application/vnd.ms-powerpoint, application/x-silverlight, application/QVOD, application/QVOD,

*/*" & vbCrLf
StrCommand = StrCommand & "Referer: http://www.baidu.com/" & vbCrLf
StrCommand = StrCommand & "Accept-Language: zh-cn" & vbCrLf
StrCommand = StrCommand & "Accept-Encoding: gzip, deflate" & vbCrLf
StrCommand = StrCommand & "User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;

SV1; QQDownload 1.7; .NET CLR 2.0.50727; CIBA; Alexa Toolbar)" & vbCrLf
StrCommand = StrCommand & "Host: www.baidu.com" & vbCrLf
StrCommand = StrCommand & "Connection: Keep-Alive" & vbCrLf
StrCommand = StrCommand & "Cookie: BAIDUID=E3E01D2A45C64A7EEED5379889E976BF:FG=1" &

vbCrLf & vbCrLf
Winsock1.SendData StrCommand
End Sub



WinSock接收来的Gzip数据解压位正常数据,希望各位大侠帮我解决。
...全文
评论 9
收藏 已收藏
分享
返回顶部
longzhiziln
API 1,488 成员 23,270 内容