伪造header请求asp
Dim SenFe_sCode
Dim oHttp : Set oHttp = Server.CreateObject("Msxml2.ServerXMLHTTP")
With oHttp
.Open "POST", "网址", False
.SetRequestHeader "Referer", "页面来源"
.SetRequestHeader "Cookie", "Cookie内容"
.SetRequestHeader "Accept-Language", "语言"
.SetRequestHeader "Content-Length", "要提交的数据长度"
.SetRequestHeader "Content-Type", "接受数据类型"
.SetRequestHeader "User-Agent", "浏览器类型"
.SetRequestHeader "Accept-Encoding", "gzip压缩"
.SetRequestHeader "Accept", "文档类型"
.Send "要提交的参数"
If .ReadyState = 4 And .Status = 200 Then
\'SenFe_sCode = .ResponseBody
SenFe_sCode = .ResponseText
\'SenFe_sCode = .GetResponseHeader("Set-Cookie")
\'SenFe_sCode = .GetAllResponseHeaders()
Else
SenFe_sCode = "错误"
End If
End With
原文:http://bbs.blueidea.com/thread-2873222-1-1.html
Dim oHttp : Set oHttp = Server.CreateObject("Msxml2.ServerXMLHTTP")
With oHttp
.Open "POST", "网址", False
.SetRequestHeader "Referer", "页面来源"
.SetRequestHeader "Cookie", "Cookie内容"
.SetRequestHeader "Accept-Language", "语言"
.SetRequestHeader "Content-Length", "要提交的数据长度"
.SetRequestHeader "Content-Type", "接受数据类型"
.SetRequestHeader "User-Agent", "浏览器类型"
.SetRequestHeader "Accept-Encoding", "gzip压缩"
.SetRequestHeader "Accept", "文档类型"
.Send "要提交的参数"
If .ReadyState = 4 And .Status = 200 Then
\'SenFe_sCode = .ResponseBody
SenFe_sCode = .ResponseText
\'SenFe_sCode = .GetResponseHeader("Set-Cookie")
\'SenFe_sCode = .GetAllResponseHeaders()
Else
SenFe_sCode = "错误"
End If
End With
原文:http://bbs.blueidea.com/thread-2873222-1-1.html
- 没有相关文章
- 没有评论