xw.asp

来自「wap系统程序源码 用户名密码:admin」· ASP 代码 · 共 67 行

ASP
67
字号
<% 
On Error Resume Next
Server.ScriptTimeOut=9999999
Function getHTTPPage(Path)
 t = GetBody(Path)      
End function
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,"utf-8")
set http=nothing 
if err.number<>0 then err.Clear 
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 
%>
<% 

Dim Url,Html,start,over,body,wap,wstr,str
Url="http://news2.3g.net.cn/index.aspx?wid=21121"
wstr=getHTTPPage(url)
start=Instr(wstr,"【今日热点】")
over=Instr(wstr,"国内")
body=mid(wstr,start,over-start)
'------------------------------------------------
body = replace(body,"<p align=""left"">","")
body = replace(body,"<p align=""center"">","")
body = replace(body,"</p>","")
body = replace(body,"<p>","")
body = replace(body,"upload/","http://news2.3g.net.cn/upload/")
body = replace(body,".aspx",".asp")
body = replace(body,"】","")
body = replace(body,"【","")
body = replace(body,"imglist.asp","/xt/new/imglist.asp")
body = replace(body,"news.asp","/xt/new/news.asp")
body = replace(body,"newstimelist.asp","/xt/new/newstimelist.asp")
body = replace(body,"news_guonei.asp?wid=21121","")
body = replace(body,"more.asp?ftp=7&amp;stp=17&amp;wid=21121","")
body = replace(body,"今日热点","===今日关注===")
body = replace(body,"more.asp?ftp=7&amp;stp=18&amp;wid=21121","")
body = replace(body,"newsorderlist.asp","/xt/new/newsorderlist.asp")
body = replace(body,"<a href=""Joke_search.asp?sid=&amp;wid=2286"">站内搜索>></a><br/>","")
body = replace(body,"<a href=""index.asp?sid=&amp;wid=2286&amp;waped=2"">切换到""2.0版""</a><br/>","")
body = replace(body,"<a href=""index.asp?sid=&amp;wid=2286&amp;waped=1"">切换到""1.0版""</a><br/>","")
'--------------------------------------------------
Response.write body
%></a>

⌨️ 快捷键说明

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