| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 556 人关注过本帖
标题:XMLHTTP小偷
只看楼主 加入收藏
mextb1860
Rank: 1
等 级:新手上路
帖 子:179
专家分:0
注 册:2005-7-10
收藏
 问题点数:0 回复次数:0 
XMLHTTP小偷

<%
Function getHTTPPage(url)
dim http
set http=Server.createobject("Microsoft.XMLHTTP")
Http.open "GET",url,false
Http.send()
if Http.readystate<>4 then
exit function
end if
getHTTPPage=bytesToBSTR(Http.responseBody,"GB2312")
set http=nothing
End function

Function BytesToBstr(body,Cset)
dim 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 = nothing
End Function
%>
<%

lsstr=getHTTPPage("http://www.baidu.com")

response.write lsstr
%>

------------------------------------------------------
Http.open "GET",url,false ====>这里是建立连接是不是?
Http.send() ============>这里是发消息.他返回的内容是什么类型的?是字符串还是2进制的

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 = nothing
这里又是什么意思啊?

搜索更多相关主题的帖子: 小偷 XMLHTTP 
2006-04-02 18:08
快速回复:XMLHTTP小偷
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.018008 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved