早教吧 育儿知识 作业答案 考试题库 百科 知识分享

用了Referer还是提示“禁止从外部提交数据”,有没有什么办法啊'FunctionPostHttpPage(RefererUrl,PostUrl,PostData)DimxmlHttpDimRetStrSetxmlHttp=CreateObject("Msxml2.XMLHTTP")xmlHttp.Open"POST",PostUrl,FalseXmlHTTP.set

题目详情
用了Referer还是提示 “禁止从外部提交数据”,有没有什么办法啊
'
Function PostHttpPage(RefererUrl,PostUrl,PostData)
Dim xmlHttp
Dim RetStr
Set xmlHttp = CreateObject("Msxml2.XMLHTTP")
xmlHttp.Open "POST",PostUrl,False
XmlHTTP.setRequestHeader "Content-Length",Len(PostData)
xmlHttp.setRequestHeader "Content-Type","application/x-www-form-urlencoded"
xmlHttp.Send PostData
If Err.Number 0 Then
Set xmlHttp=Nothing
PostHttpPage = "$False$"
Exit Function
End If
PostHttpPage=Bytes2bStr(xmlHttp.responseBody)
Set xmlHttp = nothing
End Function
Function Bytes2bStr(vin)
Dim BytesStream,StringReturn
Set BytesStream = Server.CreateObject("ADODB.Stream")
BytesStream.Type = 2
BytesStream.Open
BytesStream.WriteText vin
BytesStream.Position = 0
BytesStream.Charset = "GB2312"
BytesStream.Position = 2
StringReturn =BytesStream.ReadText
BytesStream.close
Set BytesStream = Nothing
Bytes2bStr = StringReturn
End Function
还是没有解决,问题都快到期了
▼优质解答
答案和解析
截包分析一下就知问题所在了