www.gusucode.com > 黑鹰自助链管理系统 1.1 商业版码程序 > IP/come.asp

    <!--#include file="mdb.asp"-->
<%
llqz=Cstr(Request.ServerVariables("HTTP_REFERER"))
llym=Cstr(Request.ServerVariables("SERVER_NAME"))

llqz_ym=replace(llqz,"http://","")
if(Instr(llqz_ym,"/") <=0) then
ll_host = llqz_ym
else
wz_end=instr(llqz_ym,"/")-1'返回/字符串在网址字符串中第一次出现的位置
ll_host=Mid(llqz_ym,1,wz_end)
end if
ll_host=replace(ll_host," ","")

if ll_host<>llym then
'response.redirect "../index.htm"
Response.write " "
response.end
end if
'----------------以上为防作弊功能----

server_v1=request("f")
Response.write "来路地址:"&server_v1&"<br>"
server_v=replace(server_v1,"http://","")

if(Instr(server_v,"/") <=0) then
host = server_v
else
wz_end=instr(server_v,"/")-1'返回/字符串在网址字符串中第一次出现的位置
host=Mid(server_v,1,wz_end)
end if

host=replace(host," ","")
'Response.write "来访域名:"&host&"<br>"
UserIP=Request.ServerVariables("REMOTE_ADDR")
ck=replace(host&"-"&UserIP,".","_")
'Response.write "cookie:"&ck&"<br>"

Response.write "来访域名:"&host&"<br>"
'response.write server_v&"<br>"

'创建cookie
YonRita=Request.Cookies("RitaForm") 
'response.write YonRita&"<br>"
If YonRita=ck then 
Response.write "统计过"
'统计过,不加了 
Else 
Response.Cookies("RitaForm")=ck
Response.Cookies("RitaForm").Expires=now+1 '一天过期(当前时间+1天)
'点进
Set rs = Server.CreateObject("ADODB.RecordSet")
StrSql="select * From detail where url like '%" & host & "%'"  'hymm\.\net\版\权_url='"&host&"'
'response.write StrSql&"<br>"
rs.open StrSql,Conn,1,1
If not rs.eof and not rs.bof then   
'<------------------日统计开始
if rs("youqing123_dayin")<>"" then '如果记录统计数不为空的时候 
If Datepart("d",rs("youqing123_intime"),2) <> Datepart("d",now(),2) then '如果记录点击日期不是本日 
szupdate="update detail set youqing123_in=youqing123_in+1,youqing123_yesterin=youqing123_dayin,youqing123_dayin=1,youqing123_intime=now() where id="&rs("id")&""
Conn.execute szupdate
Else '如果日期为本日之内 
xcfz=DateDiff("n",rs("youqing123_intime"),now()) '判断最后更新时间与当前时间相差几分钟 hymm\.\net\版\权
response.write "相差 <b>"&xcfz&"</b> 分钟<br>"
'response.end
if xcfz>10 then
szupdate="update detail set youqing123_in=youqing123_in+1,youqing123_dayin=youqing123_dayin+1,youqing123_10in=1,youqing123_intime=now() where id="&rs("id")&""
else
szupdate="update detail set youqing123_in=youqing123_in+1,youqing123_dayin=youqing123_dayin+1,youqing123_10in=youqing123_10in+1,youqing123_intime=now() where id="&rs("id")&"" 
end if
Conn.execute szupdate
End if 
Else '若记录统计数等于空的时候 hymm\.\net\版\权
szupdate="update detail set youqing123_in=1,youqing123_dayin=1,youqing123_10in=1,youqing123_intime=now() where id="&rs("id")&""
Conn.execute szupdate
End if 
'response.write szupdate&"--A<br>"
'-------------------日统计结束 hymm\.\net\版\权>
Else
Response.write "没找到,不统计"
End If
rs.close
set rs=nothing
End if 
if not AutoAdd then response.end

response.Write "自动收录"
conn.execute "insert into detail(title,url,classid,youqing123_time,youqing123_intime,youqing123_in,youqing123_dayin) values('自动收录','http://"&host&"',1,'"&Now&"','"&Now&"',1,1)"
'conn.execute
%>