龙鱼家园,个性,交流,技术,专注于网站技术的研究 龙鱼家园 | asp读取地址的内容
 

asp读取地址的内容

<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<%
Path="
http://www.eyegov.cn/others/contactus.asp"
t = GetBody(Path) '用GetBody函数读取
Response.BinaryWrite t '用二进制方法写到浏览器上

Function GetBody(url) '本函数为远程获取内容的函数
Set Retrieval = CreateObject("Microsoft.XMLHTTP") '建立XMLHTTP对象
With Retrieval
.Open "Get", url, False, "", "" '用Get,异步的方法发送
.Send
GetBody = .ResponseBody '函数返回获取的内容
End With
on error resume next
if Retrieval.status <>200 then
Set Retrieval = Nothing
exit function
end if
End Function
%>


Search

友情链接

  • 微足迹
  • 资质通鉴
  • 译言
  • 代码发芽网
  • 清清月儿
  • 二频
  • dotnetblogengine
  • 苹果树下
  • 联系我:
    leonardleonard@126.com

    © Copyright 2012