手机
当前位置:查字典教程网 >编程开发 >ASP教程 >ASP 中使用 HTTP 协议发送参数详解
ASP 中使用 HTTP 协议发送参数详解
摘要:

<%@LANGUAGE=“VBSCRIPT“CODEPAGE=“CP_ACP“%>

<html>

<head>

<metahttp-equiv=“Content-Type“content=“text/html;charset=Shift-JIS“>

<SCRIPTLANGUAGE=“JavaScript“>

<>

</SCRIPT>

<%

functiongetHTTPPage(url)

dimHttp

setHttp=server.createobject(“MSXML2.XMLHTTP“)

'Http.open“GET“,url,false

Http.open“POST“,url,false

Http.send()

ifHttp.readystate<>4then

exitfunction

endif

'getHTTPPage=bytesToBSTR(Http.responseBody,“GB2312“)

getHTTPPage=bytesToBSTR(Http.responseBody,“Shift-JIS“)

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.Open

objstream.Writebody

objstream.Position=0

objstream.Type=2

objstream.Charset=Cset

BytesToBstr=objstream.ReadText

objstream.Close

setobjstream=nothing

EndFunction

%>

<title></title>

</head>

<bodyonload=“SelText()“>

<%

DimUrl,Html

'Url=“http://localhost/CSharpWebAppTest/WebForm1.aspx?tmp=33333“

'Url=“http://localhost/CSharpWebAppTest/WebForm1.aspx“

Url=“http://www.whois.sc/221.216.169.120“

'Url=“http://localhost/akira/default.asp“

Html=getHTTPPage(Url)

Response.writeHtml

%>

</body>

</html>

【ASP 中使用 HTTP 协议发送参数详解】相关文章:

ASP常用函数:CLngIP()

ASP常用函数:ArrayToxml

在VBScript中使用类

利用Microsoft.XMLHTTP控件发送COOKIE

ASP中进行HTML数据及JS数据编码

ASP中js左侧多级菜单动态的解决方案

使用ASP在IIS创建WEB站点的函数

ASP使用MYSQL数据库全攻略

ASP.NET中图象处理过程详解

在ASP中利用ADO显示Excel文件内容的函数

精品推荐
分类导航