📄 tb.asp
字号:
<!--#include file="inc/inc_syssite.asp"-->
<!--#include file="Inc/Class_TrackBack.asp" -->
<%
'*********************************************************
'File: tb.asp
'Description: Receive Ping For oBlog4.0
'Author: 阿泰
'LastUpdate: 20060708
'
'Copyright: http://www.oblog.cn
'*********************************************************
'ON Error Resume Next
Dim objTrackback
Dim LogId,IP,url,title,BlogName,Excerpt,rst,rstCache
'恶意内容的操作不返回XML返回值
'IP检测
if oblog.chkiplock() then response.End()
oblog.chk_commenttime
'http://atai:4000/oblog4/tb.asp?id=125&url=http://www.sina.com&blog_name=atai&title=好文章&excerpt=不错啊
LogId=Request("id")
IP=GetIP
Url=Trim(Request("url"))
title=Trim(Request("title"))
BlogName=Trim(Request("blog_name"))
Excerpt=Trim(Request("excerpt"))
'内容检测
if oblog.chk_badword(url)>0 then oblog.adderrstr("地址中含有系统不允许的字符!")
if oblog.chk_badword(title)>0 then oblog.adderrstr("标题中含有系统不允许的字符!")
if oblog.chk_badword(BlogName)>0 then oblog.adderrstr("BLOG名称中含有系统不允许的字符!")
if oblog.chk_badword(Excerpt)>0 then oblog.adderrstr("摘要中含有系统不允许的字符!")
'专属关键字判定
if oblog.errstr<>"" then response.End()
'频度检测,如果同一IP在单位时间内发布的通告申请达到一定限额,则自动封IP
If is_sqldata=1 Then
Set rst=oblog.Execute("Select count(id) From Oblog_trackback Where ip='" & IP & "' And datediff(n,addtime,getdate())<=30")
Else
Set rst=oblog.Execute("Select count(id) From Oblog_trackback Where ip='" & IP & "' And datediff('n',addtime,now())<=30")
End If
If rst(0)> C_Spam_OneIp Then
'加入黑名单
oblog.KillIp(IP)
End If
rst.Close
Set rst=Nothing
'进行接收环节的处理
Set objTrackback = New Class_TrackBack
objTrackback.LOGID=LogId
objTrackback.IP=IP
objTrackback.URL=Url
'objTrackback.TBUSER=Trim(Request.QueryString("tbuser"))
objTrackback.TITLE=title
objTrackback.BLOG_NAME=BlogName
objTrackback.EXCERPT=Excerpt
Call Link_Database
Session("chk_commenttime")=now()
Call objTrackback.Receive()
Set objTrackback=Nothing
conn.Close
Set conn=Nothing
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -