加入收藏 | 设为首页 | 会员中心 | 我要投稿 银川站长网 (https://www.0951zz.com/)- 云通信、基础存储、云上网络、机器学习、视觉智能!
当前位置: 首页 > 站长学院 > Asp教程 > 正文

asp内xmlhttp组件发包

发布时间:2023-07-29 13:07:32 所属栏目:Asp教程 来源:
导读:asp中xmlhttp组件发包写的一个小偷函数,注意红色代码部分,其他的自己添加吧!Function PostHttpPageFrom(HttpUrl,stra,FromUrl) Dim HttpSet Http=server.createobject("MSXML2.XMLHTTP") Http.open "POST",Ht

asp中xmlhttp组件发包

写的一个小偷函数,注意红色代码部分,其他的自己添加吧!

Function PostHttpPageFrom(HttpUrl,stra,FromUrl)

   Dim Http

Set Http=server.createobject("MSXML2.XMLHTTP")

   Http.open "POST",HttpUrl,False

   Http.setrequestheader "content-length",len(stra)   Http.setrequestheader "content-

type","application/x-www-form-urlencoded"

   Http.setrequestheader "Referer",FromUrl

   Http.send stra 

If Http.Readystate<>4 then

      Set Http=Nothing 

GetHttpPage="$False$"

Exit function

End if

PostHttpPageFrom=bytesToBSTR(Http.responseBody,"gb2312")   Set Http=Nothing

If Err.number<>0 then

      Err.Clear

End If

End Function

Function BytesToBstr(Body,Cset)

   Dim Objstream

Set Objstream = Server.CreateObject("adodb.stream")

   objstream.Type = 1

objstream.Mode =3

objstream.Open1 d)

objstream.Write body

objstream.Position = 0

objstream.Type = 2

objstream.Charset = Cset

   BytesToBstr = objstream.ReadText

   objstream.Close

   set objstream = nothing

End Function

(编辑:银川站长网)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章