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

📄 caiji.asp

📁 小游戏网站演示www.4399.io 拥有4万条游戏数据
💻 ASP
字号:
<%
'option explicit
dim conn,connstr,db,rs,rs_s,rs_s1
db="msg.mdb"
Set conn = Server.CreateObject("ADODB.Connection")
connstr="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath(""&db&"")
conn.Open connstr


function getHTTPPage(url)
dim Http
set Http=server.createobject("MSXML2.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
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 

set rs=server.createobject("adodb.recordset")
sqltext="select * from msg where create=0 ORDER BY ID DESC"
rs.open sqltext,conn,1,1 
do while not rs.eof 

HTMLCode=GetHTTPPage("http://127.0.0.1/FLASH/"&RS("ChannelID")&"/show-"&rs("ArticleID")&".HTML") 
gnet="<tr><td width='14%'>"&rs("Name")&"</td><td width='57%'>"&rs("Content")&"</td><td width='20%'>"&rs("posttime")&"</td><td width='9%'>"&rs("Score")&"</td></tr>"
gnet=gnet&"<!--GNET-->"
HTMLCode= Replace(HTMLCode,"<!--GNET-->",gnet) 


filename="/FLASH/"&RS("ChannelID")&"/show-"&rs("ArticleID")&".HTML"
if HTMLCode<>"" then 
set fso = Server.CreateObject("Scripting.FileSystemObject") 
set fout = fso.CreateTextFile(server.mappath(""&filename&"")) 
fout.write HTMLCode 
fout.close 
set fout=nothing 
set fso=nothing
end if 
response.write"Done!" 
rs.movenext
loop





%> 



 

⌨️ 快捷键说明

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