早教吧作业答案频道 -->其他-->
用了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
还是没有解决,问题都快到期了
'
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
还是没有解决,问题都快到期了
▼优质解答
答案和解析
截包分析一下就知问题所在了
看了 用了Referer还是提示“...的网友还看了以下:
点和圆的位置关系中点P在圆外d>r中点P和d是什么意思 2020-06-15 …
已知菱形ABCD的对角线交于点O,AC=6,BD=8,以A为圆心,r为半径画⊙A,对于B,C,D, 2020-07-26 …
在矩形ABCD中,AB=3,AD=4,以A为圆心,r为半径做圆A,使B、C、D、至少一点在圆A内, 2020-07-26 …
长度a,外径R,内径r,体积是多少 2020-07-31 …
一个铝制空心圆柱体的外径R为2米,内径为1米,高为80厘米,把他放在水平地面上,它对地面的压强为多 2020-07-31 …
在△ABC中,a、b、c分别是角A,B,C的对边.(1)用向量知识证明:正弦定理:asinA=bs 2020-08-02 …
(2014•蚌埠一模)如图,实验室一台手摇交流发电机,内阻r=1.0Ω,外接R=9.0Ω的电阻.闭合 2020-11-12 …
根据拼音写汉字吞shì分外妖ráoniǎo娜含辛rú苦。 2020-12-10 …
若一个圆的圆心C坐标为(3,4),半径是5,那么坐标原点在圆?RT△ABC中,∠C=90°,AC=7 2021-01-13 …
用电流表内接法和电流表外接法分别测量某电阻Rx的阻值,测得的结果分别为R内和R外,则所测阻值与真实值 2021-01-22 …