📄 ok22xwcj.asp
字号:
<%@ LANGUAGE = VBScript %>
<%Admin="news"%>
<!--#include file="check.asp"-->
<!--#include file="inc/config.asp"-->
<!--#include file="ok22_xwcj_inc.asp"-->
<html>
<head>
<title>新浪娱乐新闻采集</title>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<LINK href="inc/admin.css" type=text/css rel=StyleSheet>
<META content="MSHTML 6.00.2800.1126" name=GENERATOR>
</HEAD>
<body onkeydown=return(!(event.keyCode==78&&event.ctrlKey))>
<%
if session("adminlogin")<>sessionvar then
Response.Write("<script language=javascript>alert('你尚未登录,或者超时了!请重新登录');this.top.location.href='admin.asp';</script>")
response.end
else
Dim Action,StartDate,EndDate,Conn,DbPath,tmpConn,Url,Html,Sqlstr,Rs
DbPath = "#ok22xw.mdb"
DataConn
Action = trim(Request("Action"))
If Action = "" Then
Call Default()
ElseIf Action = "del" Then
response.write "<br><center><font color=#0000F0>新浪新闻采集插件临时数据库清空</font><br>"
response.write "<br>正在将临时数据库清空<br>"
Call del()
End If
End if
sub Default()
%>
<form name="form1" method="post" action="ok22xwcj.asp?Action=Get_List">
<table align="center" width="98%" align="center" border="1" cellspacing="0" cellpadding="4" class=Hxcmsbk style="border-collapse: collapse">
<tr>
<td colspan="4" class=Hxcmsss>
<p align="center">新浪新闻采集</font></td>
</tr>
<tr>
<td class=Hxcmsqs align="center">1.<a href="ok22gn.asp">国内新闻采集</a></td>
</tr>
<tr>
<td class=Hxcmsqs align="center">2.<a href="ok22gj.asp">国际新闻采集</a></td>
</tr>
<tr>
<td class=Hxcmsqs align="center">3.<a href="ok22yl.asp">娱乐新闻采集</a></td>
</tr>
<tr>
<td class=Hxcmsqs align="center">4.<a href="ok22cj.asp">财经新闻采集</a></td>
</tr>
<tr>
<td class=Hxcmsqs align="center">5.<a href="ok22ty.asp">体育新闻采集</a></td>
</tr>
<tr>
<td class=Hxcmsqs align="center">6.<a href="ok22kj.asp">科技新闻采集</a></td>
</tr>
<tr>
<td class=Hxcmsqs align="center">6.<a href="ok22js.asp">军事新闻采集</a></td>
</tr>
<tr>
<td height=26 align="center">8.<a href="ok22xwcj.asp?Action=del"><font color=red>《清空临时数据库》请采集完后再清空否则容易造成新闻重复,建议每周清空一次</font></a></td>
</tr>
<tr>
<td colspan="4" class=Hxcmsss>本插件抓取从当前时间起24小时内新浪新闻各栏目分类浏览量最高的10-20条新闻</font></td>
</tr>
<tr>
<td class=Hxcmsds height=26>1、自动采集新浪新闻浏览量最高的新闻分类入库,将新浪新闻变成你自己站点的新闻。<BR>2、抓取从当前时间起24小时内新浪娱乐新闻浏览量最高的10-20条。建议用此法每天采集一次。<BR>3、自动过滤广告以及无用代码。<BR>4、采集过程较占资源,建议你在每天访客少时进行,且每次采集间隔时间要超过一天。
<BR>5、本插件部分代码参考其他小偷类程序由lanxuan重新制作完成,如侵犯到版权问题,请联系本人更正。</td>
</tr>
</table>
</form>
<p align="center"><a href="http://www.ah-lanxuan.com"><font color=red>欣蓝网维</font></a> lanxuan QQ:3454625<p>
<%
end sub
Sub DataConn
'On Error Resume Next
Dim strConn
If EnableDataBaseCache = 1 Then 'ACCESS数据库使用数据库缓冲
If IsObject(Application("Conn"))=False Then
Set Conn = Server.Createobject("Adodb.Connection")
strConn="Provider=Microsoft.Jet.Oledb.4.0;Data Source=" & Server.Mappath(DataBaseName)
Conn.Open strConn
Application.Lock
Set Application("Conn") = Conn
Application.UnLock
Else
Set Conn = Application("Conn")
End If
If IsObject(Application("Conn"))=False Then
Set tmpConn = Server.Createobject("Adodb.Connection")
strConn="Provider=Microsoft.Jet.Oledb.4.0;Data Source=" & Server.Mappath(DbPath)
tmpConn.Open strConn
Application.Lock
Set Application("tmpConn") = tmpConn
Application.UnLock
Else
Set tmpConn = Application("tmpConn")
End If
Else 'ACCESS数据库不使用数据库缓冲
Set Conn = Server.Createobject("Adodb.Connection")
strConn="Provider=Microsoft.Jet.Oledb.4.0;Data Source=" & Server.Mappath(DataBaseName)
Conn.Open strConn
Set tmpConn = Server.Createobject("Adodb.Connection")
strConn="Provider=Microsoft.Jet.Oledb.4.0;Data Source=" & Server.Mappath(DbPath)
tmpConn.Open strConn
End If
If Err Then
Err.Clear
Set Conn=Nothing
Set tmpConn = Nothing
Response.Write "数据库连接错误!"
Response.End
End If
End Sub
Function getHTTPPage(url)
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
sub del()
Sqlstr = "delete from SinaNews"
tmpConn.Execute(Sqlstr)
response.Write "<script>alert('清空临时数据库成功!');this.location.href='ok22xwcj.asp';</script>"
Response.End
end sub
%>
</body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -