⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 xkon.asp

📁 支持IE 手机同步访问的WAP论坛社区程序 很不错
💻 ASP
字号:
<!--#Include File="../Inc/Head.Asp"--><%
'==================================================
'函数名:GetHttpPage
'作  用:获取网页源码
'参  数:HttpUrl ------网页地址
'参  数:Cset ---------网页编码类型
'==================================================
Function GetHttpPage(HttpUrl,Cset)
   If IsNull(HttpUrl)=True Or Len(HttpUrl)<18 Or HttpUrl="$False$" Then
      GetHttpPage="$False$"
      Exit Function
   End If
   If IsNull(Cset)=True Or Cset="$False$" Then
      Cset="GB2312"
   end if
   Dim Http
   Set Http=server.createobject("MSXML2.XMLHTTP")
   Http.open "GET",HttpUrl,False
   On Error Resume Next
   if Err <> 0 then
      Err.Clear
      GetHttpPage="$False$"
      Exit Function
   end if
   Http.Send()
   If Http.Readystate<>4 then
      Set Http=Nothing 
      GetHttpPage="$False$"
      Exit function
   End if
   GetHTTPPage=bytesToBSTR(Http.responseBody,Cset)
   Set Http=Nothing
   If Err.number<>0 then
      Err.Clear
   End If
End Function

'==================================================
'函数名:BytesToBstr
'作  用:将获取的源码转换为中文
'参  数:Body ------要转换的变量
'参  数:Cset ------要转换的类型
'==================================================
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
Call H_Title("官方信息")
Dim xkon1
xkon1=GetHttpPage("http://wap.xkon.cn/s_h_z_x.Asp","UTF-8")
If xkon1="$False$" Then
	Response.Write("无相关信息或获取失败")
Else
	Response.Write(xkon1)
End If
Call H_End()
%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -