最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
asp 获取页面源代码函数xmlhttp
时间:2022-07-02 23:09:11 编辑:袖梨 来源:一聚教程网
'==============================
'函 数 名:GetHttpPage
'作 用:获取页面源代码函数
'参 数:采集链接HttpUrl
'==============================
Public Function GetHttpPage(HttpUrl)
If IsNull(HttpUrl)=True Then
Response.Write("请输入网址!")
Exit Function
End If
On Error Resume Next
Dim Http
Set Http=Server.CreateObject("MSX"&"ML2.XML"&"HTTP")
Http.Open "GET",HttpUrl,False
Http.Send()
If Err Then
Err.clear
Response.Write(SiteCloseStr)
Response.End()
End If
If Http.Readystate4 then
Set Http=Nothing
Response.Write("该网页无法访问!")
Exit function
End if
GetHttpPage=BytesToBSTR(Http.responseBody,"GB2312")
Set Http=Nothing
If Err.number0 then
Err.Clear
End If
End Function
相关文章
- 原神2025最新兑换码有哪些 限时前瞻福利领取 11-16
- 百炼英雄2025兑换码大全 最新礼包福利领取合集 11-16
- 寻道大千2025兑换码 最新可用的礼包码合集 11-16
- 蛋仔派对2025兑换码 最新礼包码合集 11-16
- 元气骑士2025兑换码大全 最新可用礼包码合集 11-16
- 明日方舟终末地测试资格查询入口 官方验证方法一览 11-16