手机
当前位置:查字典教程网 >编程开发 >ASP教程 >asp中xmlhttp组件发包
asp中xmlhttp组件发包
摘要:asp中xmlhttp组件发包写的一个小偷函数,注意红色代码部分,其他的自己添加吧!FunctionPostHttpPageFrom(Htt...

asp中xmlhttp组件发包

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

FunctionPostHttpPageFrom(HttpUrl,stra,FromUrl)

DimHttp

SetHttp=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.sendstra

IfHttp.Readystate<>4then

SetHttp=Nothing

GetHttpPage="$False$"

Exitfunction

Endif

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

IfErr.number<>0then

Err.Clear

EndIf

EndFunction

FunctionBytesToBstr(Body,Cset)

DimObjstream

SetObjstream=Server.CreateObject("adodb.stream")

objstream.Type=1

objstream.Mode=3

objstream.Open1d)

objstream.Writebody

objstream.Position=0

objstream.Type=2

objstream.Charset=Cset

BytesToBstr=objstream.ReadText

objstream.Close

setobjstream=nothing

EndFunction

【asp中xmlhttp组件发包】相关文章:

asp中Byval与Byref的区别

asp 文件上传aspjpeg组件上传文件

ASP 中Split 函数的实例

asp html转换字符程序

asp 中常用的文件处理函数

Response.Flush的使用心得

asp组件编写准备工作

asp 检测服务器所安装组件

ASP中的主页广告轮换大法

asp分页的一个类

精品推荐
分类导航