<% mode = LCASE(Request("mode")) gif = Request("gif") Set conn = Server.CreateObject("ADODB.Connection") DBPath = Server.MapPath("counter.mdb") conn.Open "driver={Microsoft Access Driver (*.mdb)};dbq=" & DBPath SET rs = Server.CreateObject("ADODB.Recordset") Rs.Open "Select * From counters" , conn,1,3 LASTIP = RS("LASTIP") NEWIP = REQUEST.servervariables("REMOTE_ADDR") IF CSTR(RS("DATE")) <> CSTR(DATE()) THEN RS("DATE") = DATE() RS("YESTERDAY") = RS("TODAY") RS("TODAY") = 1 RS.Update END IF IF LASTIP <> NEWIP THEN RS("TOTAL") = RS("TOTAL") + 1 RS("TODAY") = RS("TODAY") + 1 RS("LASTIP") = NEWIP RS.Update END IF CONN.CLOSE Function GCounter( counter ) Dim S, i, G S = CStr( counter ) For i = 1 to Len(S) G = G & "" Next response.write G End Function %>