首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > ASP >

急有关网站流量统计的有关问题.

2012-03-21 
急急....有关网站流量统计的问题...%dimh_timedimc_id,c_ip,c_timedimz,Today_ip,Altogether_ipc_idTrim

急急....有关网站流量统计的问题...
<%
dim   h_time
dim   c_id,c_ip,c_time
dim   z,Today_ip,Altogether_ip
c_id=Trim(request( "id "))
c_ip=Request.ServerVariables( "REMOTE_ADDR ")
c_time=now()
set   rs=server.createobject( "adodb.recordset ")
rs.open   "select   top   1   *   from   baxun_Count_ip   order   by   id   desc ",conn,1,3
do   while   not   rs.eof
h_time=FormatDateTime(rs( "c_time "),   2)
rs.movenext
loop
rs.close
set   rs=nothing
Powered_1= " "&chr(60)&chr(97)&chr(32)&chr(104)&chr(114)&chr(101)&chr(102)&chr(61)&chr(104)&chr(116)&chr(116)&chr(80)&chr(58)&chr(47)&chr(47)&chr(119)&chr(119)&chr(119)&chr(46)&chr(98)&chr(97)&chr(120)&chr(117)&chr(110)&chr(46)&chr(99)&chr(110)&chr(32)&chr(116)&chr(97)&chr(114)&chr(103)&chr(101)&chr(116)&chr(61)&chr(95)&chr(98)&chr(108)&chr(97)&chr(110)&chr(107)&chr(32)&chr(115)&chr(116)&chr(121)&chr(108)&chr(101)&chr(61)&chr(84)&chr(69)&chr(88)&chr(84)&chr(45)&chr(68)&chr(69)&chr(67)&chr(79)&chr(82)&chr(65)&chr(84)&chr(73)&chr(79)&chr(78)&chr(58)&chr(110)&chr(111)&chr(110)&chr(101)&chr(62)& " "
Powered_2= " "&chr(60)&chr(47)&chr(97)&chr(62)& " "
if   Cstr(h_time) <> Cstr(date())   then
set   rs=server.createobject( "adodb.recordset ")
rs.open   "select   *   from   baxun_Count_ip   order   by   id   desc ",conn,1,3
do   while   not   rs.eof
conn.execute   "delete   from   baxun_Count_ip   where   id= "&rs( "id ")
rs.movenext
loop
rs.close
set   rs=nothing
set   rs=server.createobject( "adodb.recordset ")
rs.open   "select   *   from   baxun_Count ",conn,1,3
rs( "Today_ip ")=0
rs.Update
rs.close
set   rs=nothing
end   if
set   rs=server.createobject( "adodb.recordset ")
rs.open   "select   *   from   baxun_Count_ip   where   c_ip= ' "&c_ip& " ' ",conn,1,3
if   rs.eof   and   rs.bof   then
rs.close
set   rs=nothing
Call   Count_1()
else
rs( "c_time ")=c_time
rs.Update
rs.close
set   rs=nothing
end   if
Function   Count_1()
set   r=server.createobject( "adodb.recordset ")
r.open   "select   *   from   baxun_Count ",conn,1,3
r( "Today_ip ")=r( "Today_ip ")+1
r( "Altogether_ip ")=r( "Altogether_ip ")+1
r.Update
r.close
set   r=nothing
set   r=server.createobject( "adodb.recordset ")
r.open   "select   *   from   baxun_Count_ip ",conn,1,3
r.addnew
r( "c_ip ")=c_ip
r( "c_time ")=c_time
r.Update
r.close
set   r=nothing
End   Function
z=0
set   rs=server.createobject( "adodb.recordset ")
rs.open   "select   *   from   baxun_Count_ip   order   by   id   desc ",conn,1,3
do   while   not   rs.eof
if   DateDiff( "n ",rs( "c_time "),now()) <20   then
z=z+1


end   if
rs.movenext
loop
rs.close
set   rs=nothing
z=Powered_1&z&Powered_2
set   rs=server.createobject( "adodb.recordset ")
rs.open   "select   *   from   baxun_Count ",conn,1,3
Today_ip=Powered_1&rs( "Today_ip ")&Powered_2
Altogether_ip=Powered_1&rs( "Altogether_ip ")&Powered_2
rs.close
set   rs=nothing
if   c_id=1   then   response.write   "document.writeln( " " "&z& " " "); "
if   c_id=2   then   response.write   "document.writeln( " " "&Today_ip& " " "); "
if   c_id=3   then   response.write   "document.writeln( " " "&Altogether_ip& " " "); "
%>


我想把这些代码改成,刷新一次!流量数就加1      
这样应该怎么改!!

。。。

[解决办法]
Powered_1= " "&chr(60)&chr(97)&chr(32)&chr(104)&chr(114)&chr(101)&chr(102)&chr(61)&chr(104)&chr(116)&chr(116)&chr(80)&chr(58)&chr(47)&chr(47)&chr(119)&chr(119)&chr(119)&chr(46)&chr(98)&chr(97)&chr(120)&chr(117)&chr(110)&chr(46)&chr(99)&chr(110)&chr(32)&chr(116)&chr(97)&chr(114)&chr(103)&chr(101)&chr(116)&chr(61)&chr(95)&chr(98)&chr(108)&chr(97)&chr(110)&chr(107)&chr(32)&chr(115)&chr(116)&chr(121)&chr(108)&chr(101)&chr(61)&chr(84)&chr(69)&chr(88)&chr(84)&chr(45)&chr(68)&chr(69)&chr(67)&chr(79)&chr(82)&chr(65)&chr(84)&chr(73)&chr(79)&chr(78)&chr(58)&chr(110)&chr(111)&chr(110)&chr(101)&chr(62)& " "
Powered_2= " "&chr(60)&chr(47)&chr(97)&chr(62)& " "


这个是干嘛的?
[解决办法]
@_@好像天书啊

热点排行