本篇文章主要介绍了"asp 使用MSXML2XMLHTTP发出post请求",主要涉及到GB2312方面的内容,对于ASPjrs看球网直播吧_低调看直播体育app软件下载_低调看体育直播感兴趣的同学可以参考一下:
asp参考
现在不再流行,可今天需要写一个支持post的asp程序,好不容易找了个能用的。asp函数返回值就是赋值给一个和函数名相同的变量。解决乱码问题,'U...
asp
参考
现在不再流行,可今天需要写一个支持post的asp程序,好不容易找了个能用的。asp函数返回值就是赋值给一个和函数名相同的变量。
解决乱码问题,
'UTF-8:
<%@Language="vbscript" Codepage="65001"%><head><metahttp-equiv="Content-Type"content="text/html; charset=utf-8" >head>`GB2312:
<%@Language="vbscript" Codepage="936"%><head><metahttp-equiv="Content-Type"content="text/html; charset=GB2312" >head>
<%
Onerrorresumenext'容错处理Function GetBody(ips) '获取远程IP地址POST信息Set https = Server.CreateObject("MSXML2.XMLHTTP")
With https
.Open "Post", "http://www.ip138.com/ips8.asp", False
.setRequestHeader "Content-Type","application/x-www-form-urlencoded"
.Send "ip="&ips&"&action=2"
GetBody = .ResponseBody
EndWithGetBody = BytesToBstr(GetBody,"GB2312")
Set https = NothingEndFunctionFunction BytesToBstr(body,Cset) '转换GB2312/utf-8dim objstream
set objstream = Server.CreateObject("adodb.stream")
objstream.Type = 1
objstream.Mode =3
objstream.Open
objstream.Write body
objstream.Position = 0
objstream.Type = 2
objstream.Charset = Cset
BytesToBstr = objstream.ReadText
objstream.Close
set objstream = nothingEndFunctionResponse.Write GetBody("61.186.177.105")
%>
').addClass('pre-numbering').hide();
$(this).addClass('has-numbering').parent().append($numbering);
for (i = 1; i <= lines; i++) {
$numbering.append($('
').text(i));
};
$numbering.fadeIn(1700);
});
});
以上就介绍了asp 使用MSXML2XMLHTTP发出post请求,包括了GB2312方面的内容,希望对ASPjrs看球网直播吧_低调看直播体育app软件下载_低调看体育直播有兴趣的朋友有所帮助。
本文网址链接:http://www.codes51.com/article/detail_208457.html